Index: android_webview/browser/aw_browser_context.cc |
diff --git a/android_webview/browser/aw_browser_context.cc b/android_webview/browser/aw_browser_context.cc |
index 15910789e0b8d0d5383eb6155c0b082f8f0df2e0..ca154833cea28578cff2685f4f02959dc06957cc 100644 |
--- a/android_webview/browser/aw_browser_context.cc |
+++ b/android_webview/browser/aw_browser_context.cc |
@@ -14,6 +14,7 @@ |
#include "android_webview/browser/net/aw_url_request_context_getter.h" |
#include "android_webview/browser/net/init_native_callback.h" |
#include "android_webview/common/aw_content_client.h" |
+#include "android_webview/common/pref_names.h" |
#include "base/base_paths_android.h" |
#include "base/bind.h" |
#include "base/path_service.h" |
@@ -181,8 +182,14 @@ void AwBrowserContext::PreMainMessageLoopRun() { |
LOG(WARNING) << "Failed to get cache directory for Android WebView. " |
<< "Using app data directory as a fallback."; |
} |
+ |
+ browser_policy_connector_.reset(new AwBrowserPolicyConnector()); |
sgurun-gerrit only
2015/11/13 08:43:51
I see why InitUserPrefService had to move up but i
dgn
2015/11/13 12:37:07
It's used in InitUserPrefService(). See lines 328/
sgurun-gerrit only
2015/11/18 02:23:28
k
|
+ |
+ InitUserPrefService(); |
+ |
url_request_context_getter_ = new AwURLRequestContextGetter( |
- cache_path, cookie_store_.get(), CreateProxyConfigService()); |
+ cache_path, cookie_store_.get(), CreateProxyConfigService(), |
+ user_pref_service_.get()); |
data_reduction_proxy_io_data_.reset( |
new data_reduction_proxy::DataReductionProxyIOData( |
@@ -220,10 +227,6 @@ void AwBrowserContext::PreMainMessageLoopRun() { |
form_database_service_.reset( |
new AwFormDatabaseService(context_storage_path_)); |
- browser_policy_connector_.reset(new AwBrowserPolicyConnector()); |
- |
- InitUserPrefService(); |
- |
// Ensure the storage partition is initialized in time for DataReductionProxy. |
EnsureResourceContextInitialized(this); |
@@ -298,7 +301,7 @@ AwMessagePortService* AwBrowserContext::GetMessagePortService() { |
return message_port_service_.get(); |
} |
-// Create user pref service for autofill functionality. |
+// Create user pref service |
sgurun-gerrit only
2015/11/13 08:43:51
nit: s/Create/Initialize/
dgn
2015/11/13 12:37:07
It's a null pointer before that. Isn't Create appr
sgurun-gerrit only
2015/11/18 02:23:28
no strong opinion. I guess actually you are right,
|
void AwBrowserContext::InitUserPrefService() { |
user_prefs::PrefRegistrySyncable* pref_registry = |
new user_prefs::PrefRegistrySyncable(); |
@@ -314,6 +317,10 @@ void AwBrowserContext::InitUserPrefService() { |
data_reduction_proxy::RegisterSimpleProfilePrefs(pref_registry); |
policy::URLBlacklistManager::RegisterProfilePrefs(pref_registry); |
+ pref_registry->RegisterStringPref(prefs::kAuthServerWhitelist, std::string()); |
+ pref_registry->RegisterStringPref(prefs::kAuthAndroidNegotiateAccountType, |
+ std::string()); |
+ |
base::PrefServiceFactory pref_service_factory; |
pref_service_factory.set_user_prefs(make_scoped_refptr(new AwPrefStore())); |
pref_service_factory.set_managed_prefs( |