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 1180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1191 // so it's better to fail here than fail mysteriously elsewhere. | 1191 // so it's better to fail here than fail mysteriously elsewhere. |
1192 CHECK(PathService::Get(chrome::DIR_USER_DATA, &user_data_dir)) | 1192 CHECK(PathService::Get(chrome::DIR_USER_DATA, &user_data_dir)) |
1193 << "Must be able to get user data directory!"; | 1193 << "Must be able to get user data directory!"; |
1194 #endif | 1194 #endif |
1195 | 1195 |
1196 process_singleton_.reset(new ProcessSingleton(user_data_dir)); | 1196 process_singleton_.reset(new ProcessSingleton(user_data_dir)); |
1197 | 1197 |
1198 bool is_first_run = FirstRun::IsChromeFirstRun() || | 1198 bool is_first_run = FirstRun::IsChromeFirstRun() || |
1199 parsed_command_line().HasSwitch(switches::kFirstRun); | 1199 parsed_command_line().HasSwitch(switches::kFirstRun); |
1200 | 1200 |
1201 #if defined(USE_AURA) | |
1202 // No first run on Aura. See crbug.com/99439. | |
1203 is_first_run = false; | |
1204 #endif | |
1205 | |
1206 if (parsed_command_line().HasSwitch(switches::kImport) || | 1201 if (parsed_command_line().HasSwitch(switches::kImport) || |
1207 parsed_command_line().HasSwitch(switches::kImportFromFile)) { | 1202 parsed_command_line().HasSwitch(switches::kImportFromFile)) { |
1208 // We use different BrowserProcess when importing so no GoogleURLTracker is | 1203 // We use different BrowserProcess when importing so no GoogleURLTracker is |
1209 // instantiated (as it makes a net::URLRequest and we don't have an IO | 1204 // instantiated (as it makes a net::URLRequest and we don't have an IO |
1210 // thread, see bug #1292702). | 1205 // thread, see bug #1292702). |
1211 browser_process_.reset(new FirstRunBrowserProcess(parsed_command_line())); | 1206 browser_process_.reset(new FirstRunBrowserProcess(parsed_command_line())); |
1212 is_first_run = false; | 1207 is_first_run = false; |
1213 } else { | 1208 } else { |
1214 browser_process_.reset(new BrowserProcessImpl(parsed_command_line())); | 1209 browser_process_.reset(new BrowserProcessImpl(parsed_command_line())); |
1215 } | 1210 } |
(...skipping 875 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2091 if (env->GetVar(chrome::kPreReadEnvironmentVariable, &pre_read) && | 2086 if (env->GetVar(chrome::kPreReadEnvironmentVariable, &pre_read) && |
2092 (pre_read == "0" || pre_read == "1")) { | 2087 (pre_read == "0" || pre_read == "1")) { |
2093 std::string uma_name(name); | 2088 std::string uma_name(name); |
2094 uma_name += "_PreRead"; | 2089 uma_name += "_PreRead"; |
2095 uma_name += pre_read == "1" ? "Enabled" : "Disabled"; | 2090 uma_name += pre_read == "1" ? "Enabled" : "Disabled"; |
2096 AddPreReadHistogramTime(uma_name.c_str(), time); | 2091 AddPreReadHistogramTime(uma_name.c_str(), time); |
2097 } | 2092 } |
2098 #endif | 2093 #endif |
2099 #endif | 2094 #endif |
2100 } | 2095 } |
OLD | NEW |