Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(185)

Unified Diff: android_webview/browser/aw_browser_main_parts.cc

Issue 2969693002: Always create safe browsing specific directory in WebView. (Closed)
Patch Set: rebase Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: android_webview/browser/aw_browser_main_parts.cc
diff --git a/android_webview/browser/aw_browser_main_parts.cc b/android_webview/browser/aw_browser_main_parts.cc
index 3bbe4322493c57c8ae9649f6c38f3510d3df53e1..4856e17bf1a79b8b074ad6caa30ad0ff743a0744 100644
--- a/android_webview/browser/aw_browser_main_parts.cc
+++ b/android_webview/browser/aw_browser_main_parts.cc
@@ -9,7 +9,6 @@
#include "android_webview/browser/aw_content_browser_client.h"
#include "android_webview/browser/aw_metrics_service_client.h"
#include "android_webview/browser/aw_result_codes.h"
-#include "android_webview/browser/aw_safe_browsing_config_helper.h"
#include "android_webview/browser/deferred_gpu_command_service.h"
#include "android_webview/browser/net/aw_network_change_notifier_factory.h"
#include "android_webview/common/aw_descriptors.h"
@@ -135,13 +134,15 @@ int AwBrowserMainParts::PreCreateThreads() {
}
}
- if (AwSafeBrowsingConfigHelper::GetSafeBrowsingEnabled()) {
- base::FilePath safe_browsing_dir;
- if (PathService::Get(android_webview::DIR_SAFE_BROWSING,
- &safe_browsing_dir)) {
- if (!base::PathExists(safe_browsing_dir))
- base::CreateDirectory(safe_browsing_dir);
- }
+ // We need to create the safe browsing specific directory even if the
+ // AwSafeBrowsingConfigHelper::GetSafeBrowsingEnabled() is false
+ // initially, because safe browsing can be enabled later at runtime
+ // on a per-webview basis.
+ base::FilePath safe_browsing_dir;
+ if (PathService::Get(android_webview::DIR_SAFE_BROWSING,
+ &safe_browsing_dir)) {
+ if (!base::PathExists(safe_browsing_dir))
+ base::CreateDirectory(safe_browsing_dir);
}
if (base::CommandLine::ForCurrentProcess()->HasSwitch(
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698