| 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 1191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1202 // so it's better to fail here than fail mysteriously elsewhere. | 1202 // so it's better to fail here than fail mysteriously elsewhere. |
| 1203 CHECK(PathService::Get(chrome::DIR_USER_DATA, &user_data_dir)) | 1203 CHECK(PathService::Get(chrome::DIR_USER_DATA, &user_data_dir)) |
| 1204 << "Must be able to get user data directory!"; | 1204 << "Must be able to get user data directory!"; |
| 1205 #endif | 1205 #endif |
| 1206 | 1206 |
| 1207 process_singleton_.reset(new ProcessSingleton(user_data_dir)); | 1207 process_singleton_.reset(new ProcessSingleton(user_data_dir)); |
| 1208 | 1208 |
| 1209 bool is_first_run = FirstRun::IsChromeFirstRun() || | 1209 bool is_first_run = FirstRun::IsChromeFirstRun() || |
| 1210 parsed_command_line().HasSwitch(switches::kFirstRun); | 1210 parsed_command_line().HasSwitch(switches::kFirstRun); |
| 1211 | 1211 |
| 1212 #if defined(USE_AURA) | |
| 1213 // No first run on Aura. See crbug.com/99439. | |
| 1214 is_first_run = false; | |
| 1215 #endif | |
| 1216 | |
| 1217 if (parsed_command_line().HasSwitch(switches::kImport) || | 1212 if (parsed_command_line().HasSwitch(switches::kImport) || |
| 1218 parsed_command_line().HasSwitch(switches::kImportFromFile)) { | 1213 parsed_command_line().HasSwitch(switches::kImportFromFile)) { |
| 1219 // We use different BrowserProcess when importing so no GoogleURLTracker is | 1214 // We use different BrowserProcess when importing so no GoogleURLTracker is |
| 1220 // instantiated (as it makes a net::URLRequest and we don't have an IO | 1215 // instantiated (as it makes a net::URLRequest and we don't have an IO |
| 1221 // thread, see bug #1292702). | 1216 // thread, see bug #1292702). |
| 1222 browser_process_.reset(new FirstRunBrowserProcess(parsed_command_line())); | 1217 browser_process_.reset(new FirstRunBrowserProcess(parsed_command_line())); |
| 1223 is_first_run = false; | 1218 is_first_run = false; |
| 1224 } else { | 1219 } else { |
| 1225 browser_process_.reset(new BrowserProcessImpl(parsed_command_line())); | 1220 browser_process_.reset(new BrowserProcessImpl(parsed_command_line())); |
| 1226 } | 1221 } |
| (...skipping 908 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2135 if (env->GetVar(chrome::kPreReadEnvironmentVariable, &pre_read) && | 2130 if (env->GetVar(chrome::kPreReadEnvironmentVariable, &pre_read) && |
| 2136 (pre_read == "0" || pre_read == "1")) { | 2131 (pre_read == "0" || pre_read == "1")) { |
| 2137 std::string uma_name(name); | 2132 std::string uma_name(name); |
| 2138 uma_name += "_PreRead"; | 2133 uma_name += "_PreRead"; |
| 2139 uma_name += pre_read == "1" ? "Enabled" : "Disabled"; | 2134 uma_name += pre_read == "1" ? "Enabled" : "Disabled"; |
| 2140 AddPreReadHistogramTime(uma_name.c_str(), time); | 2135 AddPreReadHistogramTime(uma_name.c_str(), time); |
| 2141 } | 2136 } |
| 2142 #endif | 2137 #endif |
| 2143 #endif | 2138 #endif |
| 2144 } | 2139 } |
| OLD | NEW |