| OLD | NEW |
| 1 // Copyright (c) 2010 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_FIRST_RUN_H_ | 5 #ifndef CHROME_BROWSER_FIRST_RUN_FIRST_RUN_H_ |
| 6 #define CHROME_BROWSER_FIRST_RUN_FIRST_RUN_H_ | 6 #define CHROME_BROWSER_FIRST_RUN_FIRST_RUN_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 275 #endif | 275 #endif |
| 276 static CommandLine* new_command_line_; | 276 static CommandLine* new_command_line_; |
| 277 }; | 277 }; |
| 278 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) | 278 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) |
| 279 | 279 |
| 280 // A subclass of BrowserProcessImpl that does not have a GoogleURLTracker or | 280 // A subclass of BrowserProcessImpl that does not have a GoogleURLTracker or |
| 281 // IntranetRedirectDetector so we don't do any URL fetches (as we have no IO | 281 // IntranetRedirectDetector so we don't do any URL fetches (as we have no IO |
| 282 // thread to fetch on). | 282 // thread to fetch on). |
| 283 class FirstRunBrowserProcess : public BrowserProcessImpl { | 283 class FirstRunBrowserProcess : public BrowserProcessImpl { |
| 284 public: | 284 public: |
| 285 explicit FirstRunBrowserProcess(const CommandLine& command_line) | 285 explicit FirstRunBrowserProcess(const CommandLine& command_line); |
| 286 : BrowserProcessImpl(command_line) { | 286 virtual ~FirstRunBrowserProcess(); |
| 287 } | |
| 288 virtual ~FirstRunBrowserProcess() { } | |
| 289 | 287 |
| 290 virtual GoogleURLTracker* google_url_tracker() { return NULL; } | 288 virtual GoogleURLTracker* google_url_tracker(); |
| 291 virtual IntranetRedirectDetector* intranet_redirect_detector() { | 289 virtual IntranetRedirectDetector* intranet_redirect_detector(); |
| 292 return NULL; | |
| 293 } | |
| 294 | 290 |
| 295 private: | 291 private: |
| 296 DISALLOW_COPY_AND_ASSIGN(FirstRunBrowserProcess); | 292 DISALLOW_COPY_AND_ASSIGN(FirstRunBrowserProcess); |
| 297 }; | 293 }; |
| 298 | 294 |
| 299 // This class is used by FirstRun::ImportNow to get notified of the outcome of | 295 // This class is used by FirstRun::ImportNow to get notified of the outcome of |
| 300 // the import operation. It differs from ImportProcessRunner in that this | 296 // the import operation. It differs from ImportProcessRunner in that this |
| 301 // class executes in the context of importing child process. | 297 // class executes in the context of importing child process. |
| 302 // The values that it handles are meant to be used as the process exit code. | 298 // The values that it handles are meant to be used as the process exit code. |
| 303 class FirstRunImportObserver : public ImportObserver { | 299 class FirstRunImportObserver : public ImportObserver { |
| 304 public: | 300 public: |
| 305 FirstRunImportObserver(); | 301 FirstRunImportObserver(); |
| 306 | 302 |
| 307 int import_result() const; | 303 int import_result() const; |
| 308 virtual void ImportCanceled(); | 304 virtual void ImportCanceled(); |
| 309 virtual void ImportComplete(); | 305 virtual void ImportComplete(); |
| 310 void RunLoop(); | 306 void RunLoop(); |
| 311 | 307 |
| 312 private: | 308 private: |
| 313 void Finish(); | 309 void Finish(); |
| 314 bool loop_running_; | 310 bool loop_running_; |
| 315 int import_result_; | 311 int import_result_; |
| 316 DISALLOW_COPY_AND_ASSIGN(FirstRunImportObserver); | 312 DISALLOW_COPY_AND_ASSIGN(FirstRunImportObserver); |
| 317 }; | 313 }; |
| 318 | 314 |
| 319 #endif // CHROME_BROWSER_FIRST_RUN_FIRST_RUN_H_ | 315 #endif // CHROME_BROWSER_FIRST_RUN_FIRST_RUN_H_ |
| OLD | NEW |