OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "android_webview/browser/aw_browser_context.h" | 5 #include "android_webview/browser/aw_browser_context.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "android_webview/browser/aw_browser_policy_connector.h" | 9 #include "android_webview/browser/aw_browser_policy_connector.h" |
10 #include "android_webview/browser/aw_form_database_service.h" | 10 #include "android_webview/browser/aw_form_database_service.h" |
11 #include "android_webview/browser/aw_metrics_service_client.h" | 11 #include "android_webview/browser/aw_metrics_service_client.h" |
12 #include "android_webview/browser/aw_permission_manager.h" | 12 #include "android_webview/browser/aw_permission_manager.h" |
13 #include "android_webview/browser/aw_pref_store.h" | 13 #include "android_webview/browser/aw_pref_store.h" |
14 #include "android_webview/browser/aw_quota_manager_bridge.h" | 14 #include "android_webview/browser/aw_quota_manager_bridge.h" |
15 #include "android_webview/browser/aw_resource_context.h" | 15 #include "android_webview/browser/aw_resource_context.h" |
16 #include "android_webview/browser/jni_dependency_factory.h" | 16 #include "android_webview/browser/jni_dependency_factory.h" |
17 #include "android_webview/browser/net/aw_url_request_context_getter.h" | 17 #include "android_webview/browser/net/aw_url_request_context_getter.h" |
18 #include "android_webview/browser/net/init_native_callback.h" | 18 #include "android_webview/browser/net/init_native_callback.h" |
19 #include "android_webview/common/aw_content_client.h" | 19 #include "android_webview/common/aw_content_client.h" |
20 #include "base/base_paths_android.h" | 20 #include "base/base_paths_android.h" |
21 #include "base/bind.h" | 21 #include "base/bind.h" |
22 #include "base/path_service.h" | 22 #include "base/path_service.h" |
23 #include "base/prefs/pref_service.h" | |
24 #include "base/prefs/pref_service_factory.h" | |
25 #include "components/autofill/core/common/autofill_pref_names.h" | 23 #include "components/autofill/core/common/autofill_pref_names.h" |
26 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_comp
ression_stats.h" | 24 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_comp
ression_stats.h" |
27 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_io_d
ata.h" | 25 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_io_d
ata.h" |
28 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_pref
s.h" | 26 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_pref
s.h" |
29 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_serv
ice.h" | 27 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_serv
ice.h" |
30 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_sett
ings.h" | 28 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_sett
ings.h" |
31 #include "components/data_reduction_proxy/core/browser/data_store.h" | 29 #include "components/data_reduction_proxy/core/browser/data_store.h" |
32 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_param
s.h" | 30 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_param
s.h" |
33 #include "components/metrics/metrics_service.h" | 31 #include "components/metrics/metrics_service.h" |
34 #include "components/policy/core/browser/browser_policy_connector_base.h" | 32 #include "components/policy/core/browser/browser_policy_connector_base.h" |
35 #include "components/policy/core/browser/configuration_policy_pref_store.h" | 33 #include "components/policy/core/browser/configuration_policy_pref_store.h" |
36 #include "components/policy/core/browser/url_blacklist_manager.h" | 34 #include "components/policy/core/browser/url_blacklist_manager.h" |
37 #include "components/pref_registry/pref_registry_syncable.h" | 35 #include "components/pref_registry/pref_registry_syncable.h" |
| 36 #include "components/prefs/pref_service.h" |
| 37 #include "components/prefs/pref_service_factory.h" |
38 #include "components/url_formatter/url_fixer.h" | 38 #include "components/url_formatter/url_fixer.h" |
39 #include "components/user_prefs/user_prefs.h" | 39 #include "components/user_prefs/user_prefs.h" |
40 #include "components/visitedlink/browser/visitedlink_master.h" | 40 #include "components/visitedlink/browser/visitedlink_master.h" |
41 #include "content/public/browser/browser_thread.h" | 41 #include "content/public/browser/browser_thread.h" |
42 #include "content/public/browser/ssl_host_state_delegate.h" | 42 #include "content/public/browser/ssl_host_state_delegate.h" |
43 #include "content/public/browser/storage_partition.h" | 43 #include "content/public/browser/storage_partition.h" |
44 #include "content/public/browser/web_contents.h" | 44 #include "content/public/browser/web_contents.h" |
45 #include "net/cookies/cookie_store.h" | 45 #include "net/cookies/cookie_store.h" |
46 #include "net/proxy/proxy_config_service_android.h" | 46 #include "net/proxy/proxy_config_service_android.h" |
47 #include "net/proxy/proxy_service.h" | 47 #include "net/proxy/proxy_service.h" |
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
340 pref_registry->RegisterBooleanPref(kDataReductionProxyEnabled, false); | 340 pref_registry->RegisterBooleanPref(kDataReductionProxyEnabled, false); |
341 data_reduction_proxy::RegisterSimpleProfilePrefs(pref_registry); | 341 data_reduction_proxy::RegisterSimpleProfilePrefs(pref_registry); |
342 policy::URLBlacklistManager::RegisterProfilePrefs(pref_registry); | 342 policy::URLBlacklistManager::RegisterProfilePrefs(pref_registry); |
343 | 343 |
344 pref_registry->RegisterStringPref(prefs::kAuthServerWhitelist, std::string()); | 344 pref_registry->RegisterStringPref(prefs::kAuthServerWhitelist, std::string()); |
345 pref_registry->RegisterStringPref(prefs::kAuthAndroidNegotiateAccountType, | 345 pref_registry->RegisterStringPref(prefs::kAuthAndroidNegotiateAccountType, |
346 std::string()); | 346 std::string()); |
347 | 347 |
348 metrics::MetricsService::RegisterPrefs(pref_registry); | 348 metrics::MetricsService::RegisterPrefs(pref_registry); |
349 | 349 |
350 base::PrefServiceFactory pref_service_factory; | 350 PrefServiceFactory pref_service_factory; |
351 pref_service_factory.set_user_prefs(make_scoped_refptr(new AwPrefStore())); | 351 pref_service_factory.set_user_prefs(make_scoped_refptr(new AwPrefStore())); |
352 pref_service_factory.set_managed_prefs( | 352 pref_service_factory.set_managed_prefs( |
353 make_scoped_refptr(new policy::ConfigurationPolicyPrefStore( | 353 make_scoped_refptr(new policy::ConfigurationPolicyPrefStore( |
354 browser_policy_connector_->GetPolicyService(), | 354 browser_policy_connector_->GetPolicyService(), |
355 browser_policy_connector_->GetHandlerList(), | 355 browser_policy_connector_->GetHandlerList(), |
356 policy::POLICY_LEVEL_MANDATORY))); | 356 policy::POLICY_LEVEL_MANDATORY))); |
357 pref_service_factory.set_read_error_callback(base::Bind(&HandleReadError)); | 357 pref_service_factory.set_read_error_callback(base::Bind(&HandleReadError)); |
358 user_pref_service_ = pref_service_factory.Create(pref_registry); | 358 user_pref_service_ = pref_service_factory.Create(pref_registry); |
359 | 359 |
360 user_prefs::UserPrefs::Set(this, user_pref_service_.get()); | 360 user_prefs::UserPrefs::Set(this, user_pref_service_.get()); |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
474 return; | 474 return; |
475 // We don't care about commit_delay for now. It is just a dummy value. | 475 // We don't care about commit_delay for now. It is just a dummy value. |
476 base::TimeDelta commit_delay = base::TimeDelta::FromMinutes(60); | 476 base::TimeDelta commit_delay = base::TimeDelta::FromMinutes(60); |
477 data_reduction_proxy_service->EnableCompressionStatisticsLogging( | 477 data_reduction_proxy_service->EnableCompressionStatisticsLogging( |
478 user_pref_service_.get(), | 478 user_pref_service_.get(), |
479 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI), | 479 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI), |
480 commit_delay); | 480 commit_delay); |
481 } | 481 } |
482 | 482 |
483 } // namespace android_webview | 483 } // namespace android_webview |
OLD | NEW |