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

Unified Diff: chrome/browser/ui/browser_init.h

Issue 8937001: Fixes for the kWasRestarted pref. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Test build fix. Created 9 years 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/browser_init.h
diff --git a/chrome/browser/ui/browser_init.h b/chrome/browser/ui/browser_init.h
index 30314739ad203aafb145d1502a0b68b97cc7b56b..84b1973a4b5b5aa587cf35431c1b5a6cc118eb9c 100644
--- a/chrome/browser/ui/browser_init.h
+++ b/chrome/browser/ui/browser_init.h
@@ -74,6 +74,11 @@ class BrowserInit {
IsFirstRun is_first_run,
int* return_code);
+ // When called the first time, reads the value of the preference kWasRestarted
+ // and resets it to false. Subsequent calls return the value which was read
+ // the first time.
+ static bool WasRestarted();
+
// LaunchWithProfile ---------------------------------------------------------
//
// Assists launching the application and appending the initial tabs for a
@@ -250,6 +255,11 @@ class BrowserInit {
// Additional tabs to open during first run.
std::vector<GURL> first_run_tabs_;
+ // Stores the value of the preference kWasRestarted had when it was read.
+ static bool was_restarted_;
+ // True if we have already read and reset the preference kWasRestarted.
sky 2011/12/13 16:54:42 nit: newline between 259 and 260.
+ static bool was_restarted_read_;
+
DISALLOW_COPY_AND_ASSIGN(BrowserInit);
};

Powered by Google App Engine
This is Rietveld 408576698