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

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

Issue 2172543003: Remove NetPrefObserver class and two prefs that do not do anything. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Re: #17. Created 4 years, 5 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 15 matching lines...) Expand all
26 #include "chrome/browser/geolocation/geolocation_prefs.h" 26 #include "chrome/browser/geolocation/geolocation_prefs.h"
27 #include "chrome/browser/gpu/gl_string_manager.h" 27 #include "chrome/browser/gpu/gl_string_manager.h"
28 #include "chrome/browser/gpu/gpu_mode_manager.h" 28 #include "chrome/browser/gpu/gpu_mode_manager.h"
29 #include "chrome/browser/intranet_redirect_detector.h" 29 #include "chrome/browser/intranet_redirect_detector.h"
30 #include "chrome/browser/io_thread.h" 30 #include "chrome/browser/io_thread.h"
31 #include "chrome/browser/media/media_capture_devices_dispatcher.h" 31 #include "chrome/browser/media/media_capture_devices_dispatcher.h"
32 #include "chrome/browser/media/media_device_id_salt.h" 32 #include "chrome/browser/media/media_device_id_salt.h"
33 #include "chrome/browser/media/media_stream_devices_controller.h" 33 #include "chrome/browser/media/media_stream_devices_controller.h"
34 #include "chrome/browser/metrics/chrome_metrics_service_client.h" 34 #include "chrome/browser/metrics/chrome_metrics_service_client.h"
35 #include "chrome/browser/net/http_server_properties_manager_factory.h" 35 #include "chrome/browser/net/http_server_properties_manager_factory.h"
36 #include "chrome/browser/net/net_pref_observer.h"
37 #include "chrome/browser/net/prediction_options.h" 36 #include "chrome/browser/net/prediction_options.h"
38 #include "chrome/browser/net/predictor.h" 37 #include "chrome/browser/net/predictor.h"
39 #include "chrome/browser/notifications/extension_welcome_notification.h" 38 #include "chrome/browser/notifications/extension_welcome_notification.h"
40 #include "chrome/browser/notifications/notifier_state_tracker.h" 39 #include "chrome/browser/notifications/notifier_state_tracker.h"
41 #include "chrome/browser/pepper_flash_settings_manager.h" 40 #include "chrome/browser/pepper_flash_settings_manager.h"
42 #include "chrome/browser/plugins/plugin_finder.h" 41 #include "chrome/browser/plugins/plugin_finder.h"
43 #include "chrome/browser/prefs/chrome_pref_service_factory.h" 42 #include "chrome/browser/prefs/chrome_pref_service_factory.h"
44 #include "chrome/browser/prefs/incognito_mode_prefs.h" 43 #include "chrome/browser/prefs/incognito_mode_prefs.h"
45 #include "chrome/browser/prefs/origin_trial_prefs.h" 44 #include "chrome/browser/prefs/origin_trial_prefs.h"
46 #include "chrome/browser/prefs/session_startup_pref.h" 45 #include "chrome/browser/prefs/session_startup_pref.h"
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 "googlegeolocationaccess.enabled"; 289 "googlegeolocationaccess.enabled";
291 #endif 290 #endif
292 291
293 // Deprecated 4/2016. 292 // Deprecated 4/2016.
294 const char kCheckDefaultBrowser[] = "browser.check_default_browser"; 293 const char kCheckDefaultBrowser[] = "browser.check_default_browser";
295 294
296 // Deprecated 5/2016. 295 // Deprecated 5/2016.
297 const char kDesktopSearchRedirectionInfobarShownPref[] = 296 const char kDesktopSearchRedirectionInfobarShownPref[] =
298 "desktop_search_redirection_infobar_shown"; 297 "desktop_search_redirection_infobar_shown";
299 298
299 // Deprecated 7/2016.
300 const char kNetworkPredictionEnabled[] = "dns_prefetching.enabled";
301 const char kDisableSpdy[] = "spdy.disabled";
302
300 void DeleteWebRTCIdentityStoreDBOnFileThread(base::FilePath profile_path) { 303 void DeleteWebRTCIdentityStoreDBOnFileThread(base::FilePath profile_path) {
301 base::DeleteFile(profile_path.Append( 304 base::DeleteFile(profile_path.Append(
302 FILE_PATH_LITERAL("WebRTCIdentityStore")), false); 305 FILE_PATH_LITERAL("WebRTCIdentityStore")), false);
303 base::DeleteFile(profile_path.Append( 306 base::DeleteFile(profile_path.Append(
304 FILE_PATH_LITERAL("WebRTCIdentityStore-journal")), false); 307 FILE_PATH_LITERAL("WebRTCIdentityStore-journal")), false);
305 } 308 }
306 309
307 void DeleteWebRTCIdentityStoreDB(Profile* profile) { 310 void DeleteWebRTCIdentityStoreDB(Profile* profile) {
308 content::BrowserThread::PostDelayedTask( 311 content::BrowserThread::PostDelayedTask(
309 content::BrowserThread::FILE, 312 content::BrowserThread::FILE,
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
452 chrome_prefs::RegisterProfilePrefs(registry); 455 chrome_prefs::RegisterProfilePrefs(registry);
453 dom_distiller::DistilledPagePrefs::RegisterProfilePrefs(registry); 456 dom_distiller::DistilledPagePrefs::RegisterProfilePrefs(registry);
454 DownloadPrefs::RegisterProfilePrefs(registry); 457 DownloadPrefs::RegisterProfilePrefs(registry);
455 HostContentSettingsMap::RegisterProfilePrefs(registry); 458 HostContentSettingsMap::RegisterProfilePrefs(registry);
456 IncognitoModePrefs::RegisterProfilePrefs(registry); 459 IncognitoModePrefs::RegisterProfilePrefs(registry);
457 InstantUI::RegisterProfilePrefs(registry); 460 InstantUI::RegisterProfilePrefs(registry);
458 NavigationCorrectionTabObserver::RegisterProfilePrefs(registry); 461 NavigationCorrectionTabObserver::RegisterProfilePrefs(registry);
459 MediaCaptureDevicesDispatcher::RegisterProfilePrefs(registry); 462 MediaCaptureDevicesDispatcher::RegisterProfilePrefs(registry);
460 MediaDeviceIDSalt::RegisterProfilePrefs(registry); 463 MediaDeviceIDSalt::RegisterProfilePrefs(registry);
461 MediaStreamDevicesController::RegisterProfilePrefs(registry); 464 MediaStreamDevicesController::RegisterProfilePrefs(registry);
462 NetPrefObserver::RegisterProfilePrefs(registry);
463 ntp_snippets::NTPSnippetsService::RegisterProfilePrefs(registry); 465 ntp_snippets::NTPSnippetsService::RegisterProfilePrefs(registry);
464 password_bubble_experiment::RegisterPrefs(registry); 466 password_bubble_experiment::RegisterPrefs(registry);
465 password_manager::PasswordManager::RegisterProfilePrefs(registry); 467 password_manager::PasswordManager::RegisterProfilePrefs(registry);
466 PrefProxyConfigTrackerImpl::RegisterProfilePrefs(registry); 468 PrefProxyConfigTrackerImpl::RegisterProfilePrefs(registry);
467 PrefsTabHelper::RegisterProfilePrefs(registry); 469 PrefsTabHelper::RegisterProfilePrefs(registry);
468 Profile::RegisterProfilePrefs(registry); 470 Profile::RegisterProfilePrefs(registry);
469 ProfileImpl::RegisterProfilePrefs(registry); 471 ProfileImpl::RegisterProfilePrefs(registry);
470 ProtocolHandlerRegistry::RegisterProfilePrefs(registry); 472 ProtocolHandlerRegistry::RegisterProfilePrefs(registry);
471 PushMessagingAppIdentifier::RegisterProfilePrefs(registry); 473 PushMessagingAppIdentifier::RegisterProfilePrefs(registry);
472 RegisterBrowserUserPrefs(registry); 474 RegisterBrowserUserPrefs(registry);
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
625 registry->RegisterBooleanPref(kRestoreOnStartupMigrated, false); 627 registry->RegisterBooleanPref(kRestoreOnStartupMigrated, false);
626 628
627 #if BUILDFLAG(ENABLE_GOOGLE_NOW) 629 #if BUILDFLAG(ENABLE_GOOGLE_NOW)
628 registry->RegisterBooleanPref(kGoogleGeolocationAccessEnabled, false); 630 registry->RegisterBooleanPref(kGoogleGeolocationAccessEnabled, false);
629 #endif 631 #endif
630 632
631 registry->RegisterBooleanPref(kCheckDefaultBrowser, true); 633 registry->RegisterBooleanPref(kCheckDefaultBrowser, true);
632 634
633 registry->RegisterBooleanPref(kDesktopSearchRedirectionInfobarShownPref, 635 registry->RegisterBooleanPref(kDesktopSearchRedirectionInfobarShownPref,
634 false); 636 false);
637
638 registry->RegisterBooleanPref(kNetworkPredictionEnabled, true);
639 registry->RegisterBooleanPref(kDisableSpdy, false);
635 } 640 }
636 641
637 void RegisterUserProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { 642 void RegisterUserProfilePrefs(user_prefs::PrefRegistrySyncable* registry) {
638 RegisterProfilePrefs(registry); 643 RegisterProfilePrefs(registry);
639 644
640 #if defined(OS_CHROMEOS) 645 #if defined(OS_CHROMEOS)
641 chromeos::PowerPrefs::RegisterUserProfilePrefs(registry); 646 chromeos::PowerPrefs::RegisterUserProfilePrefs(registry);
642 #endif 647 #endif
643 } 648 }
644 649
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
723 profile_prefs->SetInt64(prefs::kDefaultBrowserLastDeclined, 728 profile_prefs->SetInt64(prefs::kDefaultBrowserLastDeclined,
724 install_time.ToInternalValue()); 729 install_time.ToInternalValue());
725 } 730 }
726 profile_prefs->ClearPref(kCheckDefaultBrowser); 731 profile_prefs->ClearPref(kCheckDefaultBrowser);
727 732
728 // Added 5/2016. 733 // Added 5/2016.
729 profile_prefs->ClearPref(kDesktopSearchRedirectionInfobarShownPref); 734 profile_prefs->ClearPref(kDesktopSearchRedirectionInfobarShownPref);
730 735
731 // Added 7/2016. 736 // Added 7/2016.
732 DeleteWebRTCIdentityStoreDB(profile); 737 DeleteWebRTCIdentityStoreDB(profile);
738 profile_prefs->ClearPref(kNetworkPredictionEnabled);
739 profile_prefs->ClearPref(kDisableSpdy);
733 } 740 }
734 741
735 } // namespace chrome 742 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698