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

Side by Side Diff: chrome/browser/ui/network_profile_bubble.cc

Issue 18199003: Allow Chrome OS login profile to have different default pref values (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Created 7 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/ui/network_profile_bubble.h ('k') | chrome/browser/ui/prefs/prefs_tab_helper.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/ui/network_profile_bubble.h" 5 #include "chrome/browser/ui/network_profile_bubble.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 8
9 #include <wtsapi32.h> 9 #include <wtsapi32.h>
10 // Make sure we link the wtsapi lib file in. 10 // Make sure we link the wtsapi lib file in.
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 150
151 ::WTSFreeMemory(buffer); 151 ::WTSFreeMemory(buffer);
152 } 152 }
153 153
154 // static 154 // static
155 void NetworkProfileBubble::SetNotificationShown(bool shown) { 155 void NetworkProfileBubble::SetNotificationShown(bool shown) {
156 notification_shown_ = shown; 156 notification_shown_ = shown;
157 } 157 }
158 158
159 // static 159 // static
160 void NetworkProfileBubble::RegisterUserPrefs( 160 void NetworkProfileBubble::RegisterProfilePrefs(
161 user_prefs::PrefRegistrySyncable* registry) { 161 user_prefs::PrefRegistrySyncable* registry) {
162 registry->RegisterIntegerPref( 162 registry->RegisterIntegerPref(
163 prefs::kNetworkProfileWarningsLeft, 163 prefs::kNetworkProfileWarningsLeft,
164 kMaxWarnings, 164 kMaxWarnings,
165 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); 165 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
166 registry->RegisterInt64Pref( 166 registry->RegisterInt64Pref(
167 prefs::kNetworkProfileLastWarningTime, 167 prefs::kNetworkProfileLastWarningTime,
168 0, 168 0,
169 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); 169 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
170 } 170 }
171 171
172 // static 172 // static
173 void NetworkProfileBubble::RecordUmaEvent(MetricNetworkedProfileCheck event) { 173 void NetworkProfileBubble::RecordUmaEvent(MetricNetworkedProfileCheck event) {
174 UMA_HISTOGRAM_ENUMERATION(kMetricNetworkedProfileCheck, 174 UMA_HISTOGRAM_ENUMERATION(kMetricNetworkedProfileCheck,
175 event, 175 event,
176 METRIC_NETWORKED_PROFILE_CHECK_SIZE); 176 METRIC_NETWORKED_PROFILE_CHECK_SIZE);
177 } 177 }
178 178
179 // static 179 // static
180 void NetworkProfileBubble::NotifyNetworkProfileDetected() { 180 void NetworkProfileBubble::NotifyNetworkProfileDetected() {
181 Browser* browser = chrome::FindLastActiveWithHostDesktopType( 181 Browser* browser = chrome::FindLastActiveWithHostDesktopType(
182 chrome::GetActiveDesktop()); 182 chrome::GetActiveDesktop());
183 183
184 if (browser) 184 if (browser)
185 ShowNotification(browser); 185 ShowNotification(browser);
186 else 186 else
187 BrowserList::AddObserver(new BrowserListObserver()); 187 BrowserList::AddObserver(new BrowserListObserver());
188 } 188 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/network_profile_bubble.h ('k') | chrome/browser/ui/prefs/prefs_tab_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698