OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 |
11 #include "app/gfx/native_widget_types.h" | 11 #include "app/gfx/native_widget_types.h" |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 static bool SwapNewChromeExeIfPresent(); | 129 static bool SwapNewChromeExeIfPresent(); |
130 | 130 |
131 // Shows a modal dialog asking the user to give chrome another try. See | 131 // Shows a modal dialog asking the user to give chrome another try. See |
132 // above for the possible outcomes of the function. This is an experimental, | 132 // above for the possible outcomes of the function. This is an experimental, |
133 // non-localized dialog. | 133 // non-localized dialog. |
134 // |version| can be 0, 1 or 2 and selects what strings to present. | 134 // |version| can be 0, 1 or 2 and selects what strings to present. |
135 static TryResult ShowTryChromeDialog(size_t version); | 135 static TryResult ShowTryChromeDialog(size_t version); |
136 }; | 136 }; |
137 #endif | 137 #endif |
138 | 138 |
139 // A subclass of BrowserProcessImpl that does not have a GoogleURLTracker | 139 // A subclass of BrowserProcessImpl that does not have a GoogleURLTracker or |
140 // so we don't fetch as we have no IO thread (see bug #1292702). | 140 // IntranetRedirectDetector so we don't do any URL fetches (as we have no IO |
| 141 // thread to fetch on). |
141 class FirstRunBrowserProcess : public BrowserProcessImpl { | 142 class FirstRunBrowserProcess : public BrowserProcessImpl { |
142 public: | 143 public: |
143 explicit FirstRunBrowserProcess(const CommandLine& command_line) | 144 explicit FirstRunBrowserProcess(const CommandLine& command_line) |
144 : BrowserProcessImpl(command_line) { | 145 : BrowserProcessImpl(command_line) { |
145 } | 146 } |
146 virtual ~FirstRunBrowserProcess() { } | 147 virtual ~FirstRunBrowserProcess() { } |
147 | 148 |
148 virtual GoogleURLTracker* google_url_tracker() { return NULL; } | 149 virtual GoogleURLTracker* google_url_tracker() { return NULL; } |
| 150 virtual IntranetRedirectDetector* intranet_redirect_detector() { |
| 151 return NULL; |
| 152 } |
149 | 153 |
150 private: | 154 private: |
151 DISALLOW_COPY_AND_ASSIGN(FirstRunBrowserProcess); | 155 DISALLOW_COPY_AND_ASSIGN(FirstRunBrowserProcess); |
152 }; | 156 }; |
153 | 157 |
154 // Show the First Run UI to the user, allowing them to create shortcuts for | 158 // Show the First Run UI to the user, allowing them to create shortcuts for |
155 // the app, import their bookmarks and other data from another browser into | 159 // the app, import their bookmarks and other data from another browser into |
156 // |profile| and perhaps some other tasks. | 160 // |profile| and perhaps some other tasks. |
157 // |process_singleton| is used to lock the handling of CopyData messages | 161 // |process_singleton| is used to lock the handling of CopyData messages |
158 // while the First Run UI is visible. | 162 // while the First Run UI is visible. |
159 // |homepage_defined| true indicates that homepage is defined in master | 163 // |homepage_defined| true indicates that homepage is defined in master |
160 // preferences and should not be imported from another browser. | 164 // preferences and should not be imported from another browser. |
161 // |import_items| specifies the items to import, specified in master | 165 // |import_items| specifies the items to import, specified in master |
162 // preferences and will override default behavior of importer. | 166 // preferences and will override default behavior of importer. |
163 // |dont_import_items| specifies the items *not* to import, specified in master | 167 // |dont_import_items| specifies the items *not* to import, specified in master |
164 // preferences and will override default behavior of importer. | 168 // preferences and will override default behavior of importer. |
165 // Returns true if the user clicked "Start", false if the user pressed "Cancel" | 169 // Returns true if the user clicked "Start", false if the user pressed "Cancel" |
166 // or closed the dialog. | 170 // or closed the dialog. |
167 bool OpenFirstRunDialog(Profile* profile, | 171 bool OpenFirstRunDialog(Profile* profile, |
168 bool homepage_defined, | 172 bool homepage_defined, |
169 int import_items, | 173 int import_items, |
170 int dont_import_items, | 174 int dont_import_items, |
171 ProcessSingleton* process_singleton); | 175 ProcessSingleton* process_singleton); |
172 | 176 |
173 #endif // CHROME_BROWSER_FIRST_RUN_H_ | 177 #endif // CHROME_BROWSER_FIRST_RUN_H_ |
OLD | NEW |