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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 static bool RelaunchChromeBrowser(const CommandLine& command_line); | 119 static bool RelaunchChromeBrowser(const CommandLine& command_line); |
120 | 120 |
121 // If the new_chrome.exe exists (placed by the installer then is swapped | 121 // If the new_chrome.exe exists (placed by the installer then is swapped |
122 // to chrome.exe and the old chrome is renamed to old_chrome.exe. If there | 122 // to chrome.exe and the old chrome is renamed to old_chrome.exe. If there |
123 // is no new_chrome.exe or the swap fails the return is false; | 123 // is no new_chrome.exe or the swap fails the return is false; |
124 static bool SwapNewChromeExeIfPresent(); | 124 static bool SwapNewChromeExeIfPresent(); |
125 | 125 |
126 // Shows a modal dialog asking the user to give chrome another try. See | 126 // Shows a modal dialog asking the user to give chrome another try. See |
127 // above for the possible outcomes of the function. This is an experimental, | 127 // above for the possible outcomes of the function. This is an experimental, |
128 // non-localized dialog. | 128 // non-localized dialog. |
129 static TryResult ShowTryChromeDialog(); | 129 // |version| can be 0, 1 or 2 and selects what strings to present. |
| 130 static TryResult ShowTryChromeDialog(size_t version); |
130 }; | 131 }; |
131 | 132 |
132 // A subclass of BrowserProcessImpl that does not have a GoogleURLTracker | 133 // A subclass of BrowserProcessImpl that does not have a GoogleURLTracker |
133 // so we don't fetch as we have no IO thread (see bug #1292702). | 134 // so we don't fetch as we have no IO thread (see bug #1292702). |
134 class FirstRunBrowserProcess : public BrowserProcessImpl { | 135 class FirstRunBrowserProcess : public BrowserProcessImpl { |
135 public: | 136 public: |
136 FirstRunBrowserProcess(const CommandLine& command_line) | 137 FirstRunBrowserProcess(const CommandLine& command_line) |
137 : BrowserProcessImpl(command_line) { | 138 : BrowserProcessImpl(command_line) { |
138 } | 139 } |
139 virtual ~FirstRunBrowserProcess() { } | 140 virtual ~FirstRunBrowserProcess() { } |
(...skipping 11 matching lines...) Expand all Loading... |
151 // while the First Run UI is visible. | 152 // while the First Run UI is visible. |
152 // |homepage_defined| true indicates that homepage is defined in master | 153 // |homepage_defined| true indicates that homepage is defined in master |
153 // preferences and should not be imported from another browser. | 154 // preferences and should not be imported from another browser. |
154 // Returns true if the user clicked "Start", false if the user pressed "Cancel" | 155 // Returns true if the user clicked "Start", false if the user pressed "Cancel" |
155 // or closed the dialog. | 156 // or closed the dialog. |
156 bool OpenFirstRunDialog(Profile* profile, | 157 bool OpenFirstRunDialog(Profile* profile, |
157 bool homepage_defined, | 158 bool homepage_defined, |
158 ProcessSingleton* process_singleton); | 159 ProcessSingleton* process_singleton); |
159 | 160 |
160 #endif // CHROME_BROWSER_FIRST_RUN_H_ | 161 #endif // CHROME_BROWSER_FIRST_RUN_H_ |
OLD | NEW |