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

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

Issue 1102733002: Remove most occurences of PrefRegistrySyncable::UNSYNCABLE_PREF (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@prefs-add-reg-funcs
Patch Set: Created 5 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
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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
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::RegisterProfilePrefs( 160 void NetworkProfileBubble::RegisterProfilePrefs(
161 user_prefs::PrefRegistrySyncable* registry) { 161 user_prefs::PrefRegistrySyncable* registry) {
162 registry->RegisterIntegerPref( 162 registry->RegisterIntegerPref(prefs::kNetworkProfileWarningsLeft,
163 prefs::kNetworkProfileWarningsLeft, 163 kMaxWarnings);
164 kMaxWarnings, 164 registry->RegisterInt64Pref(prefs::kNetworkProfileLastWarningTime, 0);
165 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
166 registry->RegisterInt64Pref(
167 prefs::kNetworkProfileLastWarningTime,
168 0,
169 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
170 } 165 }
171 166
172 // static 167 // static
173 void NetworkProfileBubble::RecordUmaEvent(MetricNetworkedProfileCheck event) { 168 void NetworkProfileBubble::RecordUmaEvent(MetricNetworkedProfileCheck event) {
174 UMA_HISTOGRAM_ENUMERATION(kMetricNetworkedProfileCheck, 169 UMA_HISTOGRAM_ENUMERATION(kMetricNetworkedProfileCheck,
175 event, 170 event,
176 METRIC_NETWORKED_PROFILE_CHECK_SIZE); 171 METRIC_NETWORKED_PROFILE_CHECK_SIZE);
177 } 172 }
178 173
179 // static 174 // static
180 void NetworkProfileBubble::NotifyNetworkProfileDetected() { 175 void NetworkProfileBubble::NotifyNetworkProfileDetected() {
181 Browser* browser = chrome::FindLastActiveWithHostDesktopType( 176 Browser* browser = chrome::FindLastActiveWithHostDesktopType(
182 chrome::GetActiveDesktop()); 177 chrome::GetActiveDesktop());
183 178
184 if (browser) 179 if (browser)
185 ShowNotification(browser); 180 ShowNotification(browser);
186 else 181 else
187 BrowserList::AddObserver(new BrowserListObserver()); 182 BrowserList::AddObserver(new BrowserListObserver());
188 } 183 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/gesture_prefs_observer_factory_aura.cc ('k') | chrome/browser/ui/passwords/password_bubble_experiment.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698