| 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 #include "chrome/browser/browser_main.h" | 5 #include "chrome/browser/browser_main.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 1152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1163 // Note that this be done _after_ the PrefService is initialized and all | 1163 // Note that this be done _after_ the PrefService is initialized and all |
| 1164 // preferences are registered, since some of the code that the importer | 1164 // preferences are registered, since some of the code that the importer |
| 1165 // touches reads preferences. | 1165 // touches reads preferences. |
| 1166 if (is_first_run) { | 1166 if (is_first_run) { |
| 1167 if (!first_run_ui_bypass) { | 1167 if (!first_run_ui_bypass) { |
| 1168 if (!OpenFirstRunDialog(profile, | 1168 if (!OpenFirstRunDialog(profile, |
| 1169 master_prefs.homepage_defined, | 1169 master_prefs.homepage_defined, |
| 1170 master_prefs.do_import_items, | 1170 master_prefs.do_import_items, |
| 1171 master_prefs.dont_import_items, | 1171 master_prefs.dont_import_items, |
| 1172 master_prefs.run_search_engine_experiment, | 1172 master_prefs.run_search_engine_experiment, |
| 1173 master_prefs.randomize_search_engine_experiment, |
| 1173 &process_singleton)) { | 1174 &process_singleton)) { |
| 1174 // The user cancelled the first run dialog box, we should exit Chrome. | 1175 // The user cancelled the first run dialog box, we should exit Chrome. |
| 1175 return ResultCodes::NORMAL_EXIT; | 1176 return ResultCodes::NORMAL_EXIT; |
| 1176 } | 1177 } |
| 1177 #if defined(OS_POSIX) | 1178 #if defined(OS_POSIX) |
| 1178 // On Windows, the download is tagged with enable/disable stats so there | 1179 // On Windows, the download is tagged with enable/disable stats so there |
| 1179 // is no need for this code. | 1180 // is no need for this code. |
| 1180 | 1181 |
| 1181 // If stats reporting was turned on by the first run dialog then toggle | 1182 // If stats reporting was turned on by the first run dialog then toggle |
| 1182 // the pref. | 1183 // the pref. |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1364 | 1365 |
| 1365 metrics->Stop(); | 1366 metrics->Stop(); |
| 1366 | 1367 |
| 1367 // browser_shutdown takes care of deleting browser_process, so we need to | 1368 // browser_shutdown takes care of deleting browser_process, so we need to |
| 1368 // release it. | 1369 // release it. |
| 1369 ignore_result(browser_process.release()); | 1370 ignore_result(browser_process.release()); |
| 1370 browser_shutdown::Shutdown(); | 1371 browser_shutdown::Shutdown(); |
| 1371 | 1372 |
| 1372 return result_code; | 1373 return result_code; |
| 1373 } | 1374 } |
| OLD | NEW |