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

Side by Side 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: Test fixes + better tests. 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 unified diff | Download patch | Annotate | Revision Log
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 #ifndef CHROME_BROWSER_UI_BROWSER_INIT_H_ 5 #ifndef CHROME_BROWSER_UI_BROWSER_INIT_H_
6 #define CHROME_BROWSER_UI_BROWSER_INIT_H_ 6 #define CHROME_BROWSER_UI_BROWSER_INIT_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/basictypes.h" 12 #include "base/basictypes.h"
13 #include "base/file_path.h" 13 #include "base/file_path.h"
14 #include "base/gtest_prod_util.h" 14 #include "base/gtest_prod_util.h"
15 #include "chrome/browser/prefs/session_startup_pref.h"
15 #include "chrome/browser/profiles/profile.h" 16 #include "chrome/browser/profiles/profile.h"
16 #include "googleurl/src/gurl.h" 17 #include "googleurl/src/gurl.h"
17 18
18 class Browser; 19 class Browser;
19 class CommandLine; 20 class CommandLine;
20 class GURL; 21 class GURL;
21 class PrefService; 22 class PrefService;
22 class TabContentsWrapper; 23 class TabContentsWrapper;
23 24
24 // class containing helpers for BrowserMain to spin up a new instance and 25 // class containing helpers for BrowserMain to spin up a new instance and
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 const FilePath& cur_dir, 81 const FilePath& cur_dir,
81 IsProcessStartup is_process_startup, 82 IsProcessStartup is_process_startup,
82 IsFirstRun is_first_run, 83 IsFirstRun is_first_run,
83 int* return_code); 84 int* return_code);
84 85
85 // When called the first time, reads the value of the preference kWasRestarted 86 // When called the first time, reads the value of the preference kWasRestarted
86 // and resets it to false. Subsequent calls return the value which was read 87 // and resets it to false. Subsequent calls return the value which was read
87 // the first time. 88 // the first time.
88 static bool WasRestarted(); 89 static bool WasRestarted();
89 90
91 static SessionStartupPref GetSessionStartupPref(
92 const CommandLine& command_line,
93 Profile* profile);
94
90 // LaunchWithProfile --------------------------------------------------------- 95 // LaunchWithProfile ---------------------------------------------------------
91 // 96 //
92 // Assists launching the application and appending the initial tabs for a 97 // Assists launching the application and appending the initial tabs for a
93 // browser window. 98 // browser window.
94 99
95 class LaunchWithProfile { 100 class LaunchWithProfile {
96 public: 101 public:
97 // Used by OpenTabsInBrowser. 102 // Used by OpenTabsInBrowser.
98 struct Tab { 103 struct Tab {
99 Tab(); 104 Tab();
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 Profile* profile, 275 Profile* profile,
271 Profile::CreateStatus status); 276 Profile::CreateStatus status);
272 277
273 // Additional tabs to open during first run. 278 // Additional tabs to open during first run.
274 std::vector<GURL> first_run_tabs_; 279 std::vector<GURL> first_run_tabs_;
275 280
276 DISALLOW_COPY_AND_ASSIGN(BrowserInit); 281 DISALLOW_COPY_AND_ASSIGN(BrowserInit);
277 }; 282 };
278 283
279 #endif // CHROME_BROWSER_UI_BROWSER_INIT_H_ 284 #endif // CHROME_BROWSER_UI_BROWSER_INIT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698