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

Side by Side Diff: android_webview/browser/aw_browser_context.cc

Issue 1881253003: Create a PrefStore in support of Blimp metrics collection. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and fix conflict with ptr migration work. Created 4 years, 8 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 unified diff | Download patch
« no previous file with comments | « android_webview/android_webview.gyp ('k') | android_webview/browser/aw_pref_store.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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"
14 #include "android_webview/browser/aw_quota_manager_bridge.h" 13 #include "android_webview/browser/aw_quota_manager_bridge.h"
15 #include "android_webview/browser/aw_resource_context.h" 14 #include "android_webview/browser/aw_resource_context.h"
16 #include "android_webview/browser/jni_dependency_factory.h" 15 #include "android_webview/browser/jni_dependency_factory.h"
17 #include "android_webview/browser/net/aw_url_request_context_getter.h" 16 #include "android_webview/browser/net/aw_url_request_context_getter.h"
18 #include "android_webview/common/aw_content_client.h" 17 #include "android_webview/common/aw_content_client.h"
19 #include "base/base_paths_android.h" 18 #include "base/base_paths_android.h"
20 #include "base/bind.h" 19 #include "base/bind.h"
21 #include "base/path_service.h" 20 #include "base/path_service.h"
22 #include "components/autofill/core/common/autofill_pref_names.h" 21 #include "components/autofill/core/common/autofill_pref_names.h"
23 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_comp ression_stats.h" 22 #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_io_d ata.h" 23 #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_pref s.h" 24 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_pref s.h"
26 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_serv ice.h" 25 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_serv ice.h"
27 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_sett ings.h" 26 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_sett ings.h"
28 #include "components/data_reduction_proxy/core/browser/data_store.h" 27 #include "components/data_reduction_proxy/core/browser/data_store.h"
29 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_param s.h" 28 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_param s.h"
30 #include "components/metrics/metrics_service.h" 29 #include "components/metrics/metrics_service.h"
31 #include "components/policy/core/browser/browser_policy_connector_base.h" 30 #include "components/policy/core/browser/browser_policy_connector_base.h"
32 #include "components/policy/core/browser/configuration_policy_pref_store.h" 31 #include "components/policy/core/browser/configuration_policy_pref_store.h"
33 #include "components/policy/core/browser/url_blacklist_manager.h" 32 #include "components/policy/core/browser/url_blacklist_manager.h"
34 #include "components/pref_registry/pref_registry_syncable.h" 33 #include "components/pref_registry/pref_registry_syncable.h"
34 #include "components/prefs/in_memory_pref_store.h"
35 #include "components/prefs/pref_service.h" 35 #include "components/prefs/pref_service.h"
36 #include "components/prefs/pref_service_factory.h" 36 #include "components/prefs/pref_service_factory.h"
37 #include "components/url_formatter/url_fixer.h" 37 #include "components/url_formatter/url_fixer.h"
38 #include "components/user_prefs/user_prefs.h" 38 #include "components/user_prefs/user_prefs.h"
39 #include "components/visitedlink/browser/visitedlink_master.h" 39 #include "components/visitedlink/browser/visitedlink_master.h"
40 #include "content/public/browser/browser_thread.h" 40 #include "content/public/browser/browser_thread.h"
41 #include "content/public/browser/ssl_host_state_delegate.h" 41 #include "content/public/browser/ssl_host_state_delegate.h"
42 #include "content/public/browser/storage_partition.h" 42 #include "content/public/browser/storage_partition.h"
43 #include "content/public/browser/web_contents.h" 43 #include "content/public/browser/web_contents.h"
44 #include "net/proxy/proxy_config_service_android.h" 44 #include "net/proxy/proxy_config_service_android.h"
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 data_reduction_proxy::RegisterSimpleProfilePrefs(pref_registry); 316 data_reduction_proxy::RegisterSimpleProfilePrefs(pref_registry);
317 policy::URLBlacklistManager::RegisterProfilePrefs(pref_registry); 317 policy::URLBlacklistManager::RegisterProfilePrefs(pref_registry);
318 318
319 pref_registry->RegisterStringPref(prefs::kAuthServerWhitelist, std::string()); 319 pref_registry->RegisterStringPref(prefs::kAuthServerWhitelist, std::string());
320 pref_registry->RegisterStringPref(prefs::kAuthAndroidNegotiateAccountType, 320 pref_registry->RegisterStringPref(prefs::kAuthAndroidNegotiateAccountType,
321 std::string()); 321 std::string());
322 322
323 metrics::MetricsService::RegisterPrefs(pref_registry); 323 metrics::MetricsService::RegisterPrefs(pref_registry);
324 324
325 PrefServiceFactory pref_service_factory; 325 PrefServiceFactory pref_service_factory;
326 pref_service_factory.set_user_prefs(make_scoped_refptr(new AwPrefStore())); 326 pref_service_factory.set_user_prefs(make_scoped_refptr(
327 new InMemoryPrefStore()));
327 pref_service_factory.set_managed_prefs( 328 pref_service_factory.set_managed_prefs(
328 make_scoped_refptr(new policy::ConfigurationPolicyPrefStore( 329 make_scoped_refptr(new policy::ConfigurationPolicyPrefStore(
329 browser_policy_connector_->GetPolicyService(), 330 browser_policy_connector_->GetPolicyService(),
330 browser_policy_connector_->GetHandlerList(), 331 browser_policy_connector_->GetHandlerList(),
331 policy::POLICY_LEVEL_MANDATORY))); 332 policy::POLICY_LEVEL_MANDATORY)));
332 pref_service_factory.set_read_error_callback(base::Bind(&HandleReadError)); 333 pref_service_factory.set_read_error_callback(base::Bind(&HandleReadError));
333 user_pref_service_ = pref_service_factory.Create(pref_registry); 334 user_pref_service_ = pref_service_factory.Create(pref_registry);
334 335
335 user_prefs::UserPrefs::Set(this, user_pref_service_.get()); 336 user_prefs::UserPrefs::Set(this, user_pref_service_.get());
336 } 337 }
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
457 return; 458 return;
458 // We don't care about commit_delay for now. It is just a dummy value. 459 // We don't care about commit_delay for now. It is just a dummy value.
459 base::TimeDelta commit_delay = base::TimeDelta::FromMinutes(60); 460 base::TimeDelta commit_delay = base::TimeDelta::FromMinutes(60);
460 data_reduction_proxy_service->EnableCompressionStatisticsLogging( 461 data_reduction_proxy_service->EnableCompressionStatisticsLogging(
461 user_pref_service_.get(), 462 user_pref_service_.get(),
462 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI), 463 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI),
463 commit_delay); 464 commit_delay);
464 } 465 }
465 466
466 } // namespace android_webview 467 } // namespace android_webview
OLDNEW
« no previous file with comments | « android_webview/android_webview.gyp ('k') | android_webview/browser/aw_pref_store.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698