| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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_FIRST_RUN_H_ | 5 #ifndef CHROME_BROWSER_FIRST_RUN_H_ |
| 6 #define CHROME_BROWSER_FIRST_RUN_H_ | 6 #define CHROME_BROWSER_FIRST_RUN_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 // Sets the kShouldShowWelcomePage local state pref so that the browser | 90 // Sets the kShouldShowWelcomePage local state pref so that the browser |
| 91 // loads the welcome tab once the message loop gets going. Returns false | 91 // loads the welcome tab once the message loop gets going. Returns false |
| 92 // if the pref could not be set. | 92 // if the pref could not be set. |
| 93 static bool SetShowWelcomePagePref(); | 93 static bool SetShowWelcomePagePref(); |
| 94 | 94 |
| 95 private: | 95 private: |
| 96 // This class is for scoping purposes. | 96 // This class is for scoping purposes. |
| 97 DISALLOW_IMPLICIT_CONSTRUCTORS(FirstRun); | 97 DISALLOW_IMPLICIT_CONSTRUCTORS(FirstRun); |
| 98 }; | 98 }; |
| 99 | 99 |
| 100 #if !defined(OS_LINUX) || defined(TOOLKIT_VIEWS) | 100 #if defined(OS_WIN) |
| 101 // TODO(port): remove on Mac and Linux+views as well. | |
| 102 // http://code.google.com/p/chromium/issues/detail?id=9295 | |
| 103 | |
| 104 // This class contains the actions that need to be performed when an upgrade | 101 // This class contains the actions that need to be performed when an upgrade |
| 105 // is required. This involves mainly swapping the chrome exe and relaunching | 102 // is required. This involves mainly swapping the chrome exe and relaunching |
| 106 // the new browser. | 103 // the new browser. |
| 107 class Upgrade { | 104 class Upgrade { |
| 108 public: | 105 public: |
| 109 // Possible results of ShowTryChromeDialog(). | 106 // Possible results of ShowTryChromeDialog(). |
| 110 enum TryResult { | 107 enum TryResult { |
| 111 TD_TRY_CHROME, // Launch chrome right now. | 108 TD_TRY_CHROME, // Launch chrome right now. |
| 112 TD_NOT_NOW, // Don't launch chrome. Exit now. | 109 TD_NOT_NOW, // Don't launch chrome. Exit now. |
| 113 TD_UNINSTALL_CHROME, // Initiate chrome uninstall and exit. | 110 TD_UNINSTALL_CHROME, // Initiate chrome uninstall and exit. |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 // preferences and will override default behavior of importer. | 164 // preferences and will override default behavior of importer. |
| 168 // Returns true if the user clicked "Start", false if the user pressed "Cancel" | 165 // Returns true if the user clicked "Start", false if the user pressed "Cancel" |
| 169 // or closed the dialog. | 166 // or closed the dialog. |
| 170 bool OpenFirstRunDialog(Profile* profile, | 167 bool OpenFirstRunDialog(Profile* profile, |
| 171 bool homepage_defined, | 168 bool homepage_defined, |
| 172 int import_items, | 169 int import_items, |
| 173 int dont_import_items, | 170 int dont_import_items, |
| 174 ProcessSingleton* process_singleton); | 171 ProcessSingleton* process_singleton); |
| 175 | 172 |
| 176 #endif // CHROME_BROWSER_FIRST_RUN_H_ | 173 #endif // CHROME_BROWSER_FIRST_RUN_H_ |
| OLD | NEW |