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

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

Issue 561943002: Reland: Add GCMChannelStatusSyncer to schedule requests and enable/disable GCM (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix try jobs Created 6 years, 3 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/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "base/prefs/pref_registry_simple.h" 10 #include "base/prefs/pref_registry_simple.h"
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 #include "chrome/browser/ui/webui/instant_ui.h" 76 #include "chrome/browser/ui/webui/instant_ui.h"
77 #include "chrome/browser/ui/webui/ntp/new_tab_ui.h" 77 #include "chrome/browser/ui/webui/ntp/new_tab_ui.h"
78 #include "chrome/browser/ui/webui/plugins_ui.h" 78 #include "chrome/browser/ui/webui/plugins_ui.h"
79 #include "chrome/browser/ui/webui/print_preview/sticky_settings.h" 79 #include "chrome/browser/ui/webui/print_preview/sticky_settings.h"
80 #include "chrome/browser/upgrade_detector.h" 80 #include "chrome/browser/upgrade_detector.h"
81 #include "chrome/browser/web_resource/promo_resource_service.h" 81 #include "chrome/browser/web_resource/promo_resource_service.h"
82 #include "chrome/common/pref_names.h" 82 #include "chrome/common/pref_names.h"
83 #include "components/autofill/core/browser/autofill_manager.h" 83 #include "components/autofill/core/browser/autofill_manager.h"
84 #include "components/bookmarks/browser/bookmark_utils.h" 84 #include "components/bookmarks/browser/bookmark_utils.h"
85 #include "components/dom_distiller/core/distilled_page_prefs.h" 85 #include "components/dom_distiller/core/distilled_page_prefs.h"
86 #include "components/gcm_driver/gcm_channel_status_syncer.h"
86 #include "components/google/core/browser/google_pref_names.h" 87 #include "components/google/core/browser/google_pref_names.h"
87 #include "components/google/core/browser/google_url_tracker.h" 88 #include "components/google/core/browser/google_url_tracker.h"
88 #include "components/network_time/network_time_tracker.h" 89 #include "components/network_time/network_time_tracker.h"
89 #include "components/password_manager/core/browser/password_manager.h" 90 #include "components/password_manager/core/browser/password_manager.h"
90 #include "components/pref_registry/pref_registry_syncable.h" 91 #include "components/pref_registry/pref_registry_syncable.h"
91 #include "components/rappor/rappor_service.h" 92 #include "components/rappor/rappor_service.h"
92 #include "components/search_engines/template_url_prepopulate_data.h" 93 #include "components/search_engines/template_url_prepopulate_data.h"
93 #include "components/sync_driver/sync_prefs.h" 94 #include "components/sync_driver/sync_prefs.h"
94 #include "components/translate/core/browser/translate_prefs.h" 95 #include "components/translate/core/browser/translate_prefs.h"
95 #include "content/public/browser/render_process_host.h" 96 #include "content/public/browser/render_process_host.h"
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 #if defined(OS_WIN) 342 #if defined(OS_WIN)
342 app_metro_launch::RegisterPrefs(registry); 343 app_metro_launch::RegisterPrefs(registry);
343 component_updater::RegisterPrefsForSwReporter(registry); 344 component_updater::RegisterPrefsForSwReporter(registry);
344 password_manager::PasswordManager::RegisterLocalPrefs(registry); 345 password_manager::PasswordManager::RegisterLocalPrefs(registry);
345 #endif 346 #endif
346 347
347 #if defined(TOOLKIT_VIEWS) 348 #if defined(TOOLKIT_VIEWS)
348 RegisterBrowserViewLocalPrefs(registry); 349 RegisterBrowserViewLocalPrefs(registry);
349 #endif 350 #endif
350 351
352 #if !defined(OS_ANDROID)
353 // The native GCM is used on Android instead.
354 gcm::GCMChannelStatusSyncer::RegisterPrefs(registry);
355 #endif // !defined(OS_ANDROID)
356
351 // Preferences registered only for migration (clearing or moving to a new key) 357 // Preferences registered only for migration (clearing or moving to a new key)
352 // go here. 358 // go here.
353 #if !defined(OS_ANDROID) 359 #if !defined(OS_ANDROID)
354 registry->RegisterDictionaryPref(kProfileResetPromptMemento); 360 registry->RegisterDictionaryPref(kProfileResetPromptMemento);
355 #endif // !defined(OS_ANDROID) 361 #endif // !defined(OS_ANDROID)
356 } 362 }
357 363
358 // Register prefs applicable to all profiles. 364 // Register prefs applicable to all profiles.
359 void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { 365 void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) {
360 TRACE_EVENT0("browser", "chrome::RegisterUserPrefs"); 366 TRACE_EVENT0("browser", "chrome::RegisterUserPrefs");
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
435 #else 441 #else
436 AppShortcutManager::RegisterProfilePrefs(registry); 442 AppShortcutManager::RegisterProfilePrefs(registry);
437 autofill::GeneratedCreditCardBubbleController::RegisterUserPrefs(registry); 443 autofill::GeneratedCreditCardBubbleController::RegisterUserPrefs(registry);
438 DeviceIDFetcher::RegisterProfilePrefs(registry); 444 DeviceIDFetcher::RegisterProfilePrefs(registry);
439 DevToolsWindow::RegisterProfilePrefs(registry); 445 DevToolsWindow::RegisterProfilePrefs(registry);
440 DriveAppMapping::RegisterProfilePrefs(registry); 446 DriveAppMapping::RegisterProfilePrefs(registry);
441 extensions::CommandService::RegisterProfilePrefs(registry); 447 extensions::CommandService::RegisterProfilePrefs(registry);
442 extensions::ExtensionSettingsHandler::RegisterProfilePrefs(registry); 448 extensions::ExtensionSettingsHandler::RegisterProfilePrefs(registry);
443 extensions::TabsCaptureVisibleTabFunction::RegisterProfilePrefs(registry); 449 extensions::TabsCaptureVisibleTabFunction::RegisterProfilePrefs(registry);
444 first_run::RegisterProfilePrefs(registry); 450 first_run::RegisterProfilePrefs(registry);
451 gcm::GCMChannelStatusSyncer::RegisterProfilePrefs(registry);
445 NewTabUI::RegisterProfilePrefs(registry); 452 NewTabUI::RegisterProfilePrefs(registry);
446 PepperFlashSettingsManager::RegisterProfilePrefs(registry); 453 PepperFlashSettingsManager::RegisterProfilePrefs(registry);
447 PinnedTabCodec::RegisterProfilePrefs(registry); 454 PinnedTabCodec::RegisterProfilePrefs(registry);
448 PluginsUI::RegisterProfilePrefs(registry); 455 PluginsUI::RegisterProfilePrefs(registry);
449 RegisterAutolaunchUserPrefs(registry); 456 RegisterAutolaunchUserPrefs(registry);
450 signin::RegisterProfilePrefs(registry); 457 signin::RegisterProfilePrefs(registry);
451 #endif 458 #endif
452 459
453 #if !defined(OS_ANDROID) && !defined(OS_CHROMEOS) 460 #if !defined(OS_ANDROID) && !defined(OS_CHROMEOS)
454 default_apps::RegisterProfilePrefs(registry); 461 default_apps::RegisterProfilePrefs(registry);
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
609 #if defined(OS_CHROMEOS) 616 #if defined(OS_CHROMEOS)
610 chromeos::default_pinned_apps_field_trial::MigratePrefs(local_state); 617 chromeos::default_pinned_apps_field_trial::MigratePrefs(local_state);
611 #endif 618 #endif
612 619
613 #if defined(TOOLKIT_VIEWS) 620 #if defined(TOOLKIT_VIEWS)
614 MigrateBrowserTabStripPrefs(local_state); 621 MigrateBrowserTabStripPrefs(local_state);
615 #endif 622 #endif
616 } 623 }
617 624
618 } // namespace chrome 625 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698