OLD | NEW |
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> |
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
231 void AddStartupURLs(std::vector<GURL>* startup_urls) const; | 231 void AddStartupURLs(std::vector<GURL>* startup_urls) const; |
232 | 232 |
233 // Checks whether Chrome is still the default browser (unless the user | 233 // Checks whether Chrome is still the default browser (unless the user |
234 // previously instructed not to do so) and warns the user if it is not. | 234 // previously instructed not to do so) and warns the user if it is not. |
235 void CheckDefaultBrowser(Profile* profile); | 235 void CheckDefaultBrowser(Profile* profile); |
236 | 236 |
237 // Checks whether Chrome should show the 'Chrome was auto-started' infobar. | 237 // Checks whether Chrome should show the 'Chrome was auto-started' infobar. |
238 // Returns true if so. | 238 // Returns true if so. |
239 bool CheckIfAutoLaunched(Profile* profile); | 239 bool CheckIfAutoLaunched(Profile* profile); |
240 | 240 |
241 // Shows a sync promo dialog if necessary. When called |browser| should be | |
242 // the browser that's being used for startup. On return |browser| is set | |
243 // to the browser spawned from the sync promo dialog (if any). On input | |
244 // |tabs| should be the set of tabs to show on startup. On return |tabs| | |
245 // will contain the new set of tabs to show on startup. Returns the index | |
246 // of the tab to activate. | |
247 size_t ShowSyncPromoDialog(bool process_startup, | |
248 Browser** browser, | |
249 std::vector<Tab>* tabs); | |
250 | |
251 const FilePath cur_dir_; | 241 const FilePath cur_dir_; |
252 const CommandLine& command_line_; | 242 const CommandLine& command_line_; |
253 Profile* profile_; | 243 Profile* profile_; |
254 BrowserInit* browser_init_; | 244 BrowserInit* browser_init_; |
255 bool is_first_run_; | 245 bool is_first_run_; |
256 DISALLOW_COPY_AND_ASSIGN(LaunchWithProfile); | 246 DISALLOW_COPY_AND_ASSIGN(LaunchWithProfile); |
257 }; | 247 }; |
258 | 248 |
259 private: | 249 private: |
260 friend class CloudPrintProxyPolicyTest; | 250 friend class CloudPrintProxyPolicyTest; |
(...skipping 30 matching lines...) Expand all Loading... |
291 | 281 |
292 // True if we have already read and reset the preference kWasRestarted. (A | 282 // True if we have already read and reset the preference kWasRestarted. (A |
293 // member variable instead of a static variable inside WasRestarted because | 283 // member variable instead of a static variable inside WasRestarted because |
294 // of testing.) | 284 // of testing.) |
295 static bool was_restarted_read_; | 285 static bool was_restarted_read_; |
296 | 286 |
297 DISALLOW_COPY_AND_ASSIGN(BrowserInit); | 287 DISALLOW_COPY_AND_ASSIGN(BrowserInit); |
298 }; | 288 }; |
299 | 289 |
300 #endif // CHROME_BROWSER_UI_BROWSER_INIT_H_ | 290 #endif // CHROME_BROWSER_UI_BROWSER_INIT_H_ |
OLD | NEW |