| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/chrome_browser_main.h" | 5 #include "chrome/browser/chrome_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 1183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1194 // so it's better to fail here than fail mysteriously elsewhere. | 1194 // so it's better to fail here than fail mysteriously elsewhere. |
| 1195 CHECK(PathService::Get(chrome::DIR_USER_DATA, &user_data_dir)) | 1195 CHECK(PathService::Get(chrome::DIR_USER_DATA, &user_data_dir)) |
| 1196 << "Must be able to get user data directory!"; | 1196 << "Must be able to get user data directory!"; |
| 1197 #endif | 1197 #endif |
| 1198 | 1198 |
| 1199 process_singleton_.reset(new ProcessSingleton(user_data_dir)); | 1199 process_singleton_.reset(new ProcessSingleton(user_data_dir)); |
| 1200 | 1200 |
| 1201 bool is_first_run = FirstRun::IsChromeFirstRun() || | 1201 bool is_first_run = FirstRun::IsChromeFirstRun() || |
| 1202 parsed_command_line().HasSwitch(switches::kFirstRun); | 1202 parsed_command_line().HasSwitch(switches::kFirstRun); |
| 1203 | 1203 |
| 1204 #if defined(USE_AURA) | |
| 1205 // No first run on Aura. See crbug.com/99439. | |
| 1206 is_first_run = false; | |
| 1207 #endif | |
| 1208 | |
| 1209 if (parsed_command_line().HasSwitch(switches::kImport) || | 1204 if (parsed_command_line().HasSwitch(switches::kImport) || |
| 1210 parsed_command_line().HasSwitch(switches::kImportFromFile)) { | 1205 parsed_command_line().HasSwitch(switches::kImportFromFile)) { |
| 1211 // We use different BrowserProcess when importing so no GoogleURLTracker is | 1206 // We use different BrowserProcess when importing so no GoogleURLTracker is |
| 1212 // instantiated (as it makes a net::URLRequest and we don't have an IO | 1207 // instantiated (as it makes a net::URLRequest and we don't have an IO |
| 1213 // thread, see bug #1292702). | 1208 // thread, see bug #1292702). |
| 1214 browser_process_.reset(new FirstRunBrowserProcess(parsed_command_line())); | 1209 browser_process_.reset(new FirstRunBrowserProcess(parsed_command_line())); |
| 1215 is_first_run = false; | 1210 is_first_run = false; |
| 1216 } else { | 1211 } else { |
| 1217 browser_process_.reset(new BrowserProcessImpl(parsed_command_line())); | 1212 browser_process_.reset(new BrowserProcessImpl(parsed_command_line())); |
| 1218 } | 1213 } |
| (...skipping 907 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2126 if (env->GetVar(chrome::kPreReadEnvironmentVariable, &pre_read) && | 2121 if (env->GetVar(chrome::kPreReadEnvironmentVariable, &pre_read) && |
| 2127 (pre_read == "0" || pre_read == "1")) { | 2122 (pre_read == "0" || pre_read == "1")) { |
| 2128 std::string uma_name(name); | 2123 std::string uma_name(name); |
| 2129 uma_name += "_PreRead"; | 2124 uma_name += "_PreRead"; |
| 2130 uma_name += pre_read == "1" ? "Enabled" : "Disabled"; | 2125 uma_name += pre_read == "1" ? "Enabled" : "Disabled"; |
| 2131 AddPreReadHistogramTime(uma_name.c_str(), time); | 2126 AddPreReadHistogramTime(uma_name.c_str(), time); |
| 2132 } | 2127 } |
| 2133 #endif | 2128 #endif |
| 2134 #endif | 2129 #endif |
| 2135 } | 2130 } |
| OLD | NEW |