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

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

Issue 2760403003: Remove enable_media_router. (Closed)
Patch Set: . Created 3 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
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 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 127
128 #if BUILDFLAG(ENABLE_EXTENSIONS) 128 #if BUILDFLAG(ENABLE_EXTENSIONS)
129 #include "chrome/browser/accessibility/animation_policy_prefs.h" 129 #include "chrome/browser/accessibility/animation_policy_prefs.h"
130 #include "chrome/browser/apps/shortcut_manager.h" 130 #include "chrome/browser/apps/shortcut_manager.h"
131 #include "chrome/browser/extensions/activity_log/activity_log.h" 131 #include "chrome/browser/extensions/activity_log/activity_log.h"
132 #include "chrome/browser/extensions/api/commands/command_service.h" 132 #include "chrome/browser/extensions/api/commands/command_service.h"
133 #include "chrome/browser/extensions/api/tabs/tabs_api.h" 133 #include "chrome/browser/extensions/api/tabs/tabs_api.h"
134 #include "chrome/browser/extensions/extension_web_ui.h" 134 #include "chrome/browser/extensions/extension_web_ui.h"
135 #include "chrome/browser/extensions/launch_util.h" 135 #include "chrome/browser/extensions/launch_util.h"
136 #include "chrome/browser/signin/easy_unlock_service.h" 136 #include "chrome/browser/signin/easy_unlock_service.h"
137 #include "chrome/browser/ui/toolbar/component_toolbar_actions_factory.h"
137 #include "chrome/browser/ui/toolbar/toolbar_actions_bar.h" 138 #include "chrome/browser/ui/toolbar/toolbar_actions_bar.h"
138 #include "chrome/browser/ui/webui/extensions/extension_settings_handler.h" 139 #include "chrome/browser/ui/webui/extensions/extension_settings_handler.h"
139 #include "extensions/browser/api/audio/audio_api.h" 140 #include "extensions/browser/api/audio/audio_api.h"
140 #include "extensions/browser/api/runtime/runtime_api.h" 141 #include "extensions/browser/api/runtime/runtime_api.h"
141 #include "extensions/browser/extension_prefs.h" 142 #include "extensions/browser/extension_prefs.h"
142 #if defined(ENABLE_MEDIA_ROUTER)
143 #include "chrome/browser/ui/toolbar/component_toolbar_actions_factory.h"
144 #endif // defined(ENABLE_MEDIA_ROUTER)
145 #endif // BUILDFLAG(ENABLE_EXTENSIONS) 143 #endif // BUILDFLAG(ENABLE_EXTENSIONS)
146 144
147 #if BUILDFLAG(ENABLE_PLUGINS) 145 #if BUILDFLAG(ENABLE_PLUGINS)
148 #include "chrome/browser/plugins/plugins_resource_service.h" 146 #include "chrome/browser/plugins/plugins_resource_service.h"
149 #endif 147 #endif
150 148
151 #if BUILDFLAG(ENABLE_SUPERVISED_USERS) 149 #if BUILDFLAG(ENABLE_SUPERVISED_USERS)
152 #include "chrome/browser/supervised_user/child_accounts/child_account_service.h" 150 #include "chrome/browser/supervised_user/child_accounts/child_account_service.h"
153 #include "chrome/browser/supervised_user/legacy/supervised_user_shared_settings_ service.h" 151 #include "chrome/browser/supervised_user/legacy/supervised_user_shared_settings_ service.h"
154 #include "chrome/browser/supervised_user/legacy/supervised_user_sync_service.h" 152 #include "chrome/browser/supervised_user/legacy/supervised_user_sync_service.h"
(...skipping 618 matching lines...) Expand 10 before | Expand all | Expand 10 after
773 // Added 9/2016. 771 // Added 9/2016.
774 profile_prefs->ClearPref(kWebKitUsesUniversalDetector); 772 profile_prefs->ClearPref(kWebKitUsesUniversalDetector);
775 profile_prefs->ClearPref(kWebKitAllowDisplayingInsecureContent); 773 profile_prefs->ClearPref(kWebKitAllowDisplayingInsecureContent);
776 774
777 #if BUILDFLAG(ENABLE_EXTENSIONS) 775 #if BUILDFLAG(ENABLE_EXTENSIONS)
778 // Added 2/2017. 776 // Added 2/2017.
779 // NOTE(takumif): When removing this code, also remove the following tests: 777 // NOTE(takumif): When removing this code, also remove the following tests:
780 // - MediaRouterUIBrowserTest.MigrateToolbarIconShownPref 778 // - MediaRouterUIBrowserTest.MigrateToolbarIconShownPref
781 // - MediaRouterUIBrowserTest.MigrateToolbarIconUnshownPref 779 // - MediaRouterUIBrowserTest.MigrateToolbarIconUnshownPref
782 { 780 {
783 #if defined(ENABLE_MEDIA_ROUTER)
784 bool show_cast_icon = false; 781 bool show_cast_icon = false;
785 const base::DictionaryValue* action_migration_dict = 782 const base::DictionaryValue* action_migration_dict =
786 profile_prefs->GetDictionary(kToolbarMigratedComponentActionStatus); 783 profile_prefs->GetDictionary(kToolbarMigratedComponentActionStatus);
787 if (action_migration_dict && 784 if (action_migration_dict &&
788 action_migration_dict->GetBoolean( 785 action_migration_dict->GetBoolean(
789 ComponentToolbarActionsFactory::kMediaRouterActionId, 786 ComponentToolbarActionsFactory::kMediaRouterActionId,
790 &show_cast_icon)) { 787 &show_cast_icon)) {
791 profile_prefs->SetBoolean(prefs::kShowCastIconInToolbar, show_cast_icon); 788 profile_prefs->SetBoolean(prefs::kShowCastIconInToolbar, show_cast_icon);
792 } 789 }
793 #endif // defined(ENABLE_MEDIA_ROUTER)
794 profile_prefs->ClearPref(kToolbarMigratedComponentActionStatus); 790 profile_prefs->ClearPref(kToolbarMigratedComponentActionStatus);
795 } 791 }
796 #endif // BUILDFLAG(ENABLE_EXTENSIONS) 792 #endif // BUILDFLAG(ENABLE_EXTENSIONS)
797 793
798 // Added 2/2017. 794 // Added 2/2017.
799 { 795 {
800 #if BUILDFLAG(ENABLE_RLZ) 796 #if BUILDFLAG(ENABLE_RLZ)
801 const base::DictionaryValue* distro_dict = 797 const base::DictionaryValue* distro_dict =
802 profile_prefs->GetDictionary(kDistroDict); 798 profile_prefs->GetDictionary(kDistroDict);
803 int rlz_ping_delay = 0; 799 int rlz_ping_delay = 0;
(...skipping 21 matching lines...) Expand all
825 } 821 }
826 822
827 std::set<PrefValueStore::PrefStoreType> InProcessPrefStores() { 823 std::set<PrefValueStore::PrefStoreType> InProcessPrefStores() {
828 auto pref_stores = ExpectedPrefStores(); 824 auto pref_stores = ExpectedPrefStores();
829 pref_stores.erase(PrefValueStore::DEFAULT_STORE); 825 pref_stores.erase(PrefValueStore::DEFAULT_STORE);
830 pref_stores.erase(PrefValueStore::USER_STORE); 826 pref_stores.erase(PrefValueStore::USER_STORE);
831 return pref_stores; 827 return pref_stores;
832 } 828 }
833 829
834 } // namespace chrome 830 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/policy/policy_browsertest.cc ('k') | chrome/browser/prefs/pref_service_syncable_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698