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

Side by Side Diff: chrome/browser/prefs/browser_prefs.cc

Issue 2914703002: [Offline Prefetch] Backoff support for PrefetchBackgroundTask (Closed)
Patch Set: Fix test Created 3 years, 6 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
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 "chrome/browser/prefs/browser_prefs.h" 5 #include "chrome/browser/prefs/browser_prefs.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/files/file_util.h" 9 #include "base/files/file_util.h"
10 #include "base/metrics/histogram_macros.h" 10 #include "base/metrics/histogram_macros.h"
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 #include "components/gcm_driver/gcm_channel_status_syncer.h" 79 #include "components/gcm_driver/gcm_channel_status_syncer.h"
80 #include "components/metrics/metrics_service.h" 80 #include "components/metrics/metrics_service.h"
81 #include "components/network_time/network_time_tracker.h" 81 #include "components/network_time/network_time_tracker.h"
82 #include "components/ntp_snippets/content_suggestions_service.h" 82 #include "components/ntp_snippets/content_suggestions_service.h"
83 #include "components/ntp_snippets/remote/remote_suggestions_provider_impl.h" 83 #include "components/ntp_snippets/remote/remote_suggestions_provider_impl.h"
84 #include "components/ntp_snippets/remote/remote_suggestions_scheduler_impl.h" 84 #include "components/ntp_snippets/remote/remote_suggestions_scheduler_impl.h"
85 #include "components/ntp_snippets/remote/request_throttler.h" 85 #include "components/ntp_snippets/remote/request_throttler.h"
86 #include "components/ntp_snippets/sessions/foreign_sessions_suggestions_provider .h" 86 #include "components/ntp_snippets/sessions/foreign_sessions_suggestions_provider .h"
87 #include "components/ntp_snippets/user_classifier.h" 87 #include "components/ntp_snippets/user_classifier.h"
88 #include "components/ntp_tiles/most_visited_sites.h" 88 #include "components/ntp_tiles/most_visited_sites.h"
89 #include "components/offline_pages/features/features.h"
89 #include "components/omnibox/browser/zero_suggest_provider.h" 90 #include "components/omnibox/browser/zero_suggest_provider.h"
90 #include "components/password_manager/core/browser/password_bubble_experiment.h" 91 #include "components/password_manager/core/browser/password_bubble_experiment.h"
91 #include "components/password_manager/core/browser/password_manager.h" 92 #include "components/password_manager/core/browser/password_manager.h"
92 #include "components/payments/core/payment_prefs.h" 93 #include "components/payments/core/payment_prefs.h"
93 #include "components/policy/core/browser/browser_policy_connector.h" 94 #include "components/policy/core/browser/browser_policy_connector.h"
94 #include "components/policy/core/browser/url_blacklist_manager.h" 95 #include "components/policy/core/browser/url_blacklist_manager.h"
95 #include "components/policy/core/common/policy_statistics_collector.h" 96 #include "components/policy/core/common/policy_statistics_collector.h"
96 #include "components/pref_registry/pref_registry_syncable.h" 97 #include "components/pref_registry/pref_registry_syncable.h"
97 #include "components/prefs/pref_registry_simple.h" 98 #include "components/prefs/pref_registry_simple.h"
98 #include "components/prefs/pref_service.h" 99 #include "components/prefs/pref_service.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 #include "chrome/browser/extensions/ntp_overridden_bubble_delegate.h" 137 #include "chrome/browser/extensions/ntp_overridden_bubble_delegate.h"
137 #include "chrome/browser/signin/easy_unlock_service.h" 138 #include "chrome/browser/signin/easy_unlock_service.h"
138 #include "chrome/browser/ui/toolbar/component_toolbar_actions_factory.h" 139 #include "chrome/browser/ui/toolbar/component_toolbar_actions_factory.h"
139 #include "chrome/browser/ui/toolbar/toolbar_actions_bar.h" 140 #include "chrome/browser/ui/toolbar/toolbar_actions_bar.h"
140 #include "chrome/browser/ui/webui/extensions/extension_settings_handler.h" 141 #include "chrome/browser/ui/webui/extensions/extension_settings_handler.h"
141 #include "extensions/browser/api/audio/audio_api.h" 142 #include "extensions/browser/api/audio/audio_api.h"
142 #include "extensions/browser/api/runtime/runtime_api.h" 143 #include "extensions/browser/api/runtime/runtime_api.h"
143 #include "extensions/browser/extension_prefs.h" 144 #include "extensions/browser/extension_prefs.h"
144 #endif // BUILDFLAG(ENABLE_EXTENSIONS) 145 #endif // BUILDFLAG(ENABLE_EXTENSIONS)
145 146
147 #if BUILDFLAG(ENABLE_OFFLINE_PAGES)
148 #include "chrome/browser/android/offline_pages/prefetch/prefetch_background_task .h"
149 #endif
150
146 #if BUILDFLAG(ENABLE_PLUGINS) 151 #if BUILDFLAG(ENABLE_PLUGINS)
147 #include "chrome/browser/plugins/plugins_resource_service.h" 152 #include "chrome/browser/plugins/plugins_resource_service.h"
148 #endif 153 #endif
149 154
150 #if BUILDFLAG(ENABLE_SUPERVISED_USERS) 155 #if BUILDFLAG(ENABLE_SUPERVISED_USERS)
151 #include "chrome/browser/supervised_user/child_accounts/child_account_service.h" 156 #include "chrome/browser/supervised_user/child_accounts/child_account_service.h"
152 #include "chrome/browser/supervised_user/legacy/supervised_user_shared_settings_ service.h" 157 #include "chrome/browser/supervised_user/legacy/supervised_user_shared_settings_ service.h"
153 #include "chrome/browser/supervised_user/legacy/supervised_user_sync_service.h" 158 #include "chrome/browser/supervised_user/legacy/supervised_user_sync_service.h"
154 #include "chrome/browser/supervised_user/supervised_user_service.h" 159 #include "chrome/browser/supervised_user/supervised_user_service.h"
155 #include "chrome/browser/supervised_user/supervised_user_whitelist_service.h" 160 #include "chrome/browser/supervised_user/supervised_user_whitelist_service.h"
(...skipping 515 matching lines...) Expand 10 before | Expand all | Expand 10 after
671 registry->RegisterStringPref(kRecentlySelectedEncoding, std::string()); 676 registry->RegisterStringPref(kRecentlySelectedEncoding, std::string());
672 registry->RegisterBooleanPref(kWebKitUsesUniversalDetector, true); 677 registry->RegisterBooleanPref(kWebKitUsesUniversalDetector, true);
673 678
674 registry->RegisterBooleanPref(kWebKitAllowDisplayingInsecureContent, true); 679 registry->RegisterBooleanPref(kWebKitAllowDisplayingInsecureContent, true);
675 680
676 #if BUILDFLAG(ENABLE_EXTENSIONS) 681 #if BUILDFLAG(ENABLE_EXTENSIONS)
677 registry->RegisterDictionaryPref(kToolbarMigratedComponentActionStatus); 682 registry->RegisterDictionaryPref(kToolbarMigratedComponentActionStatus);
678 #endif 683 #endif
679 684
680 registry->RegisterDictionaryPref(kDistroDict); 685 registry->RegisterDictionaryPref(kDistroDict);
686
687 #if BUILDFLAG(ENABLE_OFFLINE_PAGES)
688 offline_pages::RegisterPrefetchBackgroundTaskPrefs(registry);
689 #endif
681 } 690 }
682 691
683 void RegisterUserProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { 692 void RegisterUserProfilePrefs(user_prefs::PrefRegistrySyncable* registry) {
684 RegisterProfilePrefs(registry); 693 RegisterProfilePrefs(registry);
685 694
686 #if defined(OS_CHROMEOS) 695 #if defined(OS_CHROMEOS)
687 chromeos::PowerPrefs::RegisterUserProfilePrefs(registry); 696 chromeos::PowerPrefs::RegisterUserProfilePrefs(registry);
688 #endif 697 #endif
689 698
690 #if defined(OS_ANDROID) 699 #if defined(OS_ANDROID)
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
806 // default values for all prefs locally. Since we already have the defaults it 815 // default values for all prefs locally. Since we already have the defaults it
807 // would be wasteful to request them from the service by connecting to the 816 // would be wasteful to request them from the service by connecting to the
808 // DEFAULT_STORE. 817 // DEFAULT_STORE.
809 // TODO(sammc): Once we have this distinction, connect to the default pref 818 // TODO(sammc): Once we have this distinction, connect to the default pref
810 // store here (by erasing it from |pref_stores|). 819 // store here (by erasing it from |pref_stores|).
811 pref_stores.erase(PrefValueStore::USER_STORE); 820 pref_stores.erase(PrefValueStore::USER_STORE);
812 return pref_stores; 821 return pref_stores;
813 } 822 }
814 823
815 } // namespace chrome 824 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698