Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: libadblockplus-android-webview/src/org/adblockplus/libadblockplus/android/webview/AdblockWebView.java

Issue 29389555: Issue 5010 - Allow to preload subscription files (Closed)
Patch Set: force downloading actually Created March 30, 2017, 10:12 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * This file is part of Adblock Plus <https://adblockplus.org/>, 2 * This file is part of Adblock Plus <https://adblockplus.org/>,
3 * Copyright (C) 2006-2016 Eyeo GmbH 3 * Copyright (C) 2006-2016 Eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 936 matching lines...) Expand 10 before | Expand all | Expand 10 after
947 { 947 {
948 intWebViewClient = new AdblockWebViewClient(); 948 intWebViewClient = new AdblockWebViewClient();
949 applyAdblockEnabled(); 949 applyAdblockEnabled();
950 } 950 }
951 951
952 private void createAdblockEngine() 952 private void createAdblockEngine()
953 { 953 {
954 w("Creating AdblockEngine"); 954 w("Creating AdblockEngine");
955 955
956 // assuming `this.debugMode` can be used as `developmentBuild` value 956 // assuming `this.debugMode` can be used as `developmentBuild` value
957 adblockEngine = AdblockEngine.create( 957 adblockEngine = AdblockEngine
958 AdblockEngine.generateAppInfo(this.getContext(), debugMode), 958 .builder(
959 this.getContext().getCacheDir().getAbsolutePath(), 959 AdblockEngine.generateAppInfo(this.getContext(), debugMode),
960 true); 960 this.getContext().getDir(AdblockEngine.BASE_PATH_DIRECTORY, Context.MODE _PRIVATE).getAbsolutePath())
961 .enableElementHiding(true)
962 .build();
961 } 963 }
962 964
963 private class ElemHideThread extends Thread 965 private class ElemHideThread extends Thread
964 { 966 {
965 private String selectorsString; 967 private String selectorsString;
966 private CountDownLatch finishedLatch; 968 private CountDownLatch finishedLatch;
967 private AtomicBoolean isCancelled; 969 private AtomicBoolean isCancelled;
968 970
969 public ElemHideThread(CountDownLatch finishedLatch) 971 public ElemHideThread(CountDownLatch finishedLatch)
970 { 972 {
(...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after
1415 w("Busy with elemhide selectors, delayed disposing scheduled"); 1417 w("Busy with elemhide selectors, delayed disposing scheduled");
1416 elemHideThread.setFinishedRunnable(disposeRunnable); 1418 elemHideThread.setFinishedRunnable(disposeRunnable);
1417 } 1419 }
1418 else 1420 else
1419 { 1421 {
1420 disposeRunnable.run(); 1422 disposeRunnable.run();
1421 } 1423 }
1422 } 1424 }
1423 } 1425 }
1424 } 1426 }
OLDNEW

Powered by Google App Engine
This is Rietveld