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

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

Issue 9232007: Fix: after updating, restore tabs from all profiles. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: DCHECK fix. Created 8 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/sessions/session_service.cc ('k') | chrome/browser/ui/browser_init.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/browser_init.h
diff --git a/chrome/browser/ui/browser_init.h b/chrome/browser/ui/browser_init.h
index 8ccec348c3bdfe70d1a79d516497c516a787537f..6675ec117d265cfdd8c57d10c0edf8ca1541b4fd 100644
--- a/chrome/browser/ui/browser_init.h
+++ b/chrome/browser/ui/browser_init.h
@@ -12,6 +12,7 @@
#include "base/basictypes.h"
#include "base/file_path.h"
#include "base/gtest_prod_util.h"
+#include "chrome/browser/prefs/session_startup_pref.h"
#include "chrome/browser/profiles/profile.h"
#include "googleurl/src/gurl.h"
@@ -87,6 +88,10 @@ class BrowserInit {
// the first time.
static bool WasRestarted();
+ static SessionStartupPref GetSessionStartupPref(
+ const CommandLine& command_line,
+ Profile* profile);
+
// LaunchWithProfile ---------------------------------------------------------
//
// Assists launching the application and appending the initial tabs for a
@@ -247,6 +252,10 @@ class BrowserInit {
private:
friend class CloudPrintProxyPolicyTest;
friend class CloudPrintProxyPolicyStartupTest;
+ FRIEND_TEST_ALL_PREFIXES(BrowserInitTest,
+ ReadingWasRestartedAfterNormalStart);
+ FRIEND_TEST_ALL_PREFIXES(BrowserInitTest, ReadingWasRestartedAfterRestart);
+ FRIEND_TEST_ALL_PREFIXES(BrowserInitTest, UpdateWithTwoProfiles);
// Returns the list of URLs to open from the command line. The returned
// vector is empty if the user didn't specify any URLs on the command line.
@@ -273,6 +282,11 @@ class BrowserInit {
// Additional tabs to open during first run.
std::vector<GURL> first_run_tabs_;
+ // True if we have already read and reset the preference kWasRestarted. (A
+ // member variable instead of a static variable inside WasRestarted because
+ // of testing.)
+ static bool was_restarted_read_;
+
DISALLOW_COPY_AND_ASSIGN(BrowserInit);
};
« no previous file with comments | « chrome/browser/sessions/session_service.cc ('k') | chrome/browser/ui/browser_init.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698