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

Side by Side Diff: chrome/browser/upgrade_detector.cc

Issue 6905044: Refactor preference syncing. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix the previous fix 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/upgrade_detector.h" 5 #include "chrome/browser/upgrade_detector.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 145
146 private: 146 private:
147 Task* upgrade_detected_task_; 147 Task* upgrade_detected_task_;
148 bool* is_unstable_channel_; 148 bool* is_unstable_channel_;
149 }; 149 };
150 150
151 } // namespace 151 } // namespace
152 152
153 // static 153 // static
154 void UpgradeDetector::RegisterPrefs(PrefService* prefs) { 154 void UpgradeDetector::RegisterPrefs(PrefService* prefs) {
155 prefs->RegisterBooleanPref(prefs::kRestartLastSessionOnShutdown, false); 155 prefs->RegisterBooleanPref(prefs::kRestartLastSessionOnShutdown,
156 false,
157 false /* don't sync pref */);
156 } 158 }
157 159
158 UpgradeDetector::UpgradeDetector() 160 UpgradeDetector::UpgradeDetector()
159 : ALLOW_THIS_IN_INITIALIZER_LIST(method_factory_(this)), 161 : ALLOW_THIS_IN_INITIALIZER_LIST(method_factory_(this)),
160 is_unstable_channel_(false), 162 is_unstable_channel_(false),
161 upgrade_notification_stage_(UPGRADE_ANNOYANCE_NONE), 163 upgrade_notification_stage_(UPGRADE_ANNOYANCE_NONE),
162 notify_upgrade_(false) { 164 notify_upgrade_(false) {
163 CommandLine command_line(*CommandLine::ForCurrentProcess()); 165 CommandLine command_line(*CommandLine::ForCurrentProcess());
164 if (command_line.HasSwitch(switches::kDisableBackgroundNetworking)) 166 if (command_line.HasSwitch(switches::kDisableBackgroundNetworking))
165 return; 167 return;
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 upgrade_notification_timer_.Stop(); 259 upgrade_notification_timer_.Stop();
258 } 260 }
259 261
260 notify_upgrade_ = true; 262 notify_upgrade_ = true;
261 263
262 NotificationService::current()->Notify( 264 NotificationService::current()->Notify(
263 NotificationType::UPGRADE_RECOMMENDED, 265 NotificationType::UPGRADE_RECOMMENDED,
264 Source<UpgradeDetector>(this), 266 Source<UpgradeDetector>(this),
265 NotificationService::NoDetails()); 267 NotificationService::NoDetails());
266 } 268 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698