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

Side by Side Diff: chrome/browser/policy/managed_prefs_banner_base.cc

Issue 6955010: Remove the Remoting Host component from Chrome. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/policy/managed_prefs_banner_base.h" 5 #include "chrome/browser/policy/managed_prefs_banner_base.h"
6 6
7 #include "chrome/browser/browser_process.h" 7 #include "chrome/browser/browser_process.h"
8 #include "chrome/browser/prefs/pref_service.h" 8 #include "chrome/browser/prefs/pref_service.h"
9 #include "chrome/browser/prefs/pref_set_observer.h" 9 #include "chrome/browser/prefs/pref_set_observer.h"
10 #include "chrome/common/pref_names.h" 10 #include "chrome/common/pref_names.h"
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 AddUserPref(prefs::kNetworkPredictionEnabled); 88 AddUserPref(prefs::kNetworkPredictionEnabled);
89 AddUserPref(prefs::kDisableSpdy); 89 AddUserPref(prefs::kDisableSpdy);
90 AddUserPref(prefs::kSafeBrowsingEnabled); 90 AddUserPref(prefs::kSafeBrowsingEnabled);
91 #if defined(GOOGLE_CHROME_BUILD) 91 #if defined(GOOGLE_CHROME_BUILD)
92 AddLocalStatePref(prefs::kMetricsReportingEnabled); 92 AddLocalStatePref(prefs::kMetricsReportingEnabled);
93 #endif 93 #endif
94 AddUserPref(prefs::kProxy); 94 AddUserPref(prefs::kProxy);
95 AddUserPref(prefs::kCloudPrintProxyEnabled); 95 AddUserPref(prefs::kCloudPrintProxyEnabled);
96 AddUserPref(prefs::kDownloadDefaultDirectory); 96 AddUserPref(prefs::kDownloadDefaultDirectory);
97 AddUserPref(prefs::kEnableTranslate); 97 AddUserPref(prefs::kEnableTranslate);
98 AddUserPref(prefs::kChromotingEnabled);
99 AddUserPref(prefs::kChromotingHostEnabled);
100 break; 98 break;
101 #if defined(OS_CHROMEOS) 99 #if defined(OS_CHROMEOS)
102 case OPTIONS_PAGE_ACCOUNTS: 100 case OPTIONS_PAGE_ACCOUNTS:
103 AddLocalStatePref(chromeos::kAccountsPrefAllowGuest); 101 AddLocalStatePref(chromeos::kAccountsPrefAllowGuest);
104 AddLocalStatePref(chromeos::kAccountsPrefAllowNewUser); 102 AddLocalStatePref(chromeos::kAccountsPrefAllowNewUser);
105 AddLocalStatePref(chromeos::kAccountsPrefShowUserNamesOnSignIn); 103 AddLocalStatePref(chromeos::kAccountsPrefShowUserNamesOnSignIn);
106 AddLocalStatePref(chromeos::kAccountsPrefUsers); 104 AddLocalStatePref(chromeos::kAccountsPrefUsers);
107 AddLocalStatePref(chromeos::kSystemTimezone); 105 AddLocalStatePref(chromeos::kSystemTimezone);
108 break; 106 break;
109 #endif 107 #endif
110 default: 108 default:
111 NOTREACHED(); 109 NOTREACHED();
112 } 110 }
113 } 111 }
114 112
115 void ManagedPrefsBannerBase::Observe(NotificationType type, 113 void ManagedPrefsBannerBase::Observe(NotificationType type,
116 const NotificationSource& source, 114 const NotificationSource& source,
117 const NotificationDetails& details) { 115 const NotificationDetails& details) {
118 if (NotificationType::PREF_CHANGED == type) { 116 if (NotificationType::PREF_CHANGED == type) {
119 std::string* pref = Details<std::string>(details).ptr(); 117 std::string* pref = Details<std::string>(details).ptr();
120 if (pref && (local_state_set_->IsObserved(*pref) || 118 if (pref && (local_state_set_->IsObserved(*pref) ||
121 user_pref_set_->IsObserved(*pref))) 119 user_pref_set_->IsObserved(*pref)))
122 OnUpdateVisibility(); 120 OnUpdateVisibility();
123 } 121 }
124 } 122 }
125 123
126 } // namespace policy 124 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698