| OLD | NEW |
| 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/metrics/histogram_macros.h" | 9 #include "base/metrics/histogram_macros.h" |
| 10 #include "base/trace_event/trace_event.h" | 10 #include "base/trace_event/trace_event.h" |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 #include "components/web_resource/promo_resource_service.h" | 98 #include "components/web_resource/promo_resource_service.h" |
| 99 #include "content/public/browser/render_process_host.h" | 99 #include "content/public/browser/render_process_host.h" |
| 100 #include "net/http/http_server_properties_manager.h" | 100 #include "net/http/http_server_properties_manager.h" |
| 101 | 101 |
| 102 #if BUILDFLAG(ENABLE_BACKGROUND) | 102 #if BUILDFLAG(ENABLE_BACKGROUND) |
| 103 #include "chrome/browser/background/background_mode_manager.h" | 103 #include "chrome/browser/background/background_mode_manager.h" |
| 104 #endif | 104 #endif |
| 105 | 105 |
| 106 #if defined(ENABLE_EXTENSIONS) | 106 #if defined(ENABLE_EXTENSIONS) |
| 107 #include "chrome/browser/accessibility/animation_policy_prefs.h" | 107 #include "chrome/browser/accessibility/animation_policy_prefs.h" |
| 108 #include "chrome/browser/apps/drive/drive_app_mapping.h" | |
| 109 #include "chrome/browser/apps/shortcut_manager.h" | 108 #include "chrome/browser/apps/shortcut_manager.h" |
| 110 #include "chrome/browser/extensions/activity_log/activity_log.h" | 109 #include "chrome/browser/extensions/activity_log/activity_log.h" |
| 111 #include "chrome/browser/extensions/api/commands/command_service.h" | 110 #include "chrome/browser/extensions/api/commands/command_service.h" |
| 112 #include "chrome/browser/extensions/api/copresence/copresence_api.h" | 111 #include "chrome/browser/extensions/api/copresence/copresence_api.h" |
| 113 #include "chrome/browser/extensions/api/tabs/tabs_api.h" | 112 #include "chrome/browser/extensions/api/tabs/tabs_api.h" |
| 114 #include "chrome/browser/extensions/component_migration_helper.h" | 113 #include "chrome/browser/extensions/component_migration_helper.h" |
| 115 #include "chrome/browser/extensions/extension_web_ui.h" | 114 #include "chrome/browser/extensions/extension_web_ui.h" |
| 116 #include "chrome/browser/extensions/launch_util.h" | 115 #include "chrome/browser/extensions/launch_util.h" |
| 117 #include "chrome/browser/signin/easy_unlock_service.h" | 116 #include "chrome/browser/signin/easy_unlock_service.h" |
| 118 #include "chrome/browser/ui/toolbar/toolbar_actions_bar.h" | 117 #include "chrome/browser/ui/toolbar/toolbar_actions_bar.h" |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 219 #endif | 218 #endif |
| 220 | 219 |
| 221 #if defined(USE_ASH) | 220 #if defined(USE_ASH) |
| 222 #include "chrome/browser/ui/ash/chrome_launcher_prefs.h" | 221 #include "chrome/browser/ui/ash/chrome_launcher_prefs.h" |
| 223 #endif | 222 #endif |
| 224 | 223 |
| 225 #if !defined(OS_ANDROID) && !defined(OS_CHROMEOS) | 224 #if !defined(OS_ANDROID) && !defined(OS_CHROMEOS) |
| 226 #include "chrome/browser/ui/startup/default_browser_prompt.h" | 225 #include "chrome/browser/ui/startup/default_browser_prompt.h" |
| 227 #endif | 226 #endif |
| 228 | 227 |
| 228 #if defined(ENABLE_APP_LIST) |
| 229 #include "chrome/browser/apps/drive/drive_app_mapping.h" |
| 230 #endif |
| 231 |
| 229 namespace { | 232 namespace { |
| 230 | 233 |
| 231 #if defined(OS_WIN) | 234 #if defined(OS_WIN) |
| 232 // Deprecated 11/2015 (M48). TODO(gab): delete in M52+. | 235 // Deprecated 11/2015 (M48). TODO(gab): delete in M52+. |
| 233 const char kShownAutoLaunchInfobarDeprecated[] = | 236 const char kShownAutoLaunchInfobarDeprecated[] = |
| 234 "browser.shown_autolaunch_infobar"; | 237 "browser.shown_autolaunch_infobar"; |
| 235 #endif // defined(OS_WIN) | 238 #endif // defined(OS_WIN) |
| 236 | 239 |
| 237 // The SessionStartupPref used this pref to store the list of URLs to restore | 240 // The SessionStartupPref used this pref to store the list of URLs to restore |
| 238 // on startup, and then renamed it to "sessions.startup_urls" in M31. Migration | 241 // on startup, and then renamed it to "sessions.startup_urls" in M31. Migration |
| (...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 497 #if BUILDFLAG(ANDROID_JAVA_UI) | 500 #if BUILDFLAG(ANDROID_JAVA_UI) |
| 498 variations::VariationsService::RegisterProfilePrefs(registry); | 501 variations::VariationsService::RegisterProfilePrefs(registry); |
| 499 MostVisitedSites::RegisterProfilePrefs(registry); | 502 MostVisitedSites::RegisterProfilePrefs(registry); |
| 500 NewTabPagePrefs::RegisterProfilePrefs(registry); | 503 NewTabPagePrefs::RegisterProfilePrefs(registry); |
| 501 PartnerBookmarksShim::RegisterProfilePrefs(registry); | 504 PartnerBookmarksShim::RegisterProfilePrefs(registry); |
| 502 PopularSites::RegisterProfilePrefs(registry); | 505 PopularSites::RegisterProfilePrefs(registry); |
| 503 #else | 506 #else |
| 504 AppShortcutManager::RegisterProfilePrefs(registry); | 507 AppShortcutManager::RegisterProfilePrefs(registry); |
| 505 DeviceIDFetcher::RegisterProfilePrefs(registry); | 508 DeviceIDFetcher::RegisterProfilePrefs(registry); |
| 506 DevToolsWindow::RegisterProfilePrefs(registry); | 509 DevToolsWindow::RegisterProfilePrefs(registry); |
| 510 #if defined(ENABLE_APP_LIST) |
| 507 DriveAppMapping::RegisterProfilePrefs(registry); | 511 DriveAppMapping::RegisterProfilePrefs(registry); |
| 512 #endif |
| 508 extensions::CommandService::RegisterProfilePrefs(registry); | 513 extensions::CommandService::RegisterProfilePrefs(registry); |
| 509 extensions::ExtensionSettingsHandler::RegisterProfilePrefs(registry); | 514 extensions::ExtensionSettingsHandler::RegisterProfilePrefs(registry); |
| 510 extensions::TabsCaptureVisibleTabFunction::RegisterProfilePrefs(registry); | 515 extensions::TabsCaptureVisibleTabFunction::RegisterProfilePrefs(registry); |
| 511 first_run::RegisterProfilePrefs(registry); | 516 first_run::RegisterProfilePrefs(registry); |
| 512 gcm::GCMChannelStatusSyncer::RegisterProfilePrefs(registry); | 517 gcm::GCMChannelStatusSyncer::RegisterProfilePrefs(registry); |
| 513 NewTabUI::RegisterProfilePrefs(registry); | 518 NewTabUI::RegisterProfilePrefs(registry); |
| 514 PepperFlashSettingsManager::RegisterProfilePrefs(registry); | 519 PepperFlashSettingsManager::RegisterProfilePrefs(registry); |
| 515 PinnedTabCodec::RegisterProfilePrefs(registry); | 520 PinnedTabCodec::RegisterProfilePrefs(registry); |
| 516 signin::RegisterProfilePrefs(registry); | 521 signin::RegisterProfilePrefs(registry); |
| 517 #endif | 522 #endif |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 682 metrics_service | 687 metrics_service |
| 683 ? base::Time::FromTimeT(metrics_service->GetInstallDate()) | 688 ? base::Time::FromTimeT(metrics_service->GetInstallDate()) |
| 684 : base::Time::Now(); | 689 : base::Time::Now(); |
| 685 profile_prefs->SetInt64(prefs::kDefaultBrowserLastDeclined, | 690 profile_prefs->SetInt64(prefs::kDefaultBrowserLastDeclined, |
| 686 install_time.ToInternalValue()); | 691 install_time.ToInternalValue()); |
| 687 } | 692 } |
| 688 profile_prefs->ClearPref(kCheckDefaultBrowser); | 693 profile_prefs->ClearPref(kCheckDefaultBrowser); |
| 689 } | 694 } |
| 690 | 695 |
| 691 } // namespace chrome | 696 } // namespace chrome |
| OLD | NEW |