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 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
223 if (command_line.HasSwitch(switches::kBrowserCrashTest)) { | 223 if (command_line.HasSwitch(switches::kBrowserCrashTest)) { |
224 int* bad_pointer = NULL; | 224 int* bad_pointer = NULL; |
225 *bad_pointer = 0; | 225 *bad_pointer = 0; |
226 } | 226 } |
227 | 227 |
228 #if defined(OS_CHROMEOS) | 228 #if defined(OS_CHROMEOS) |
229 // Test loading libcros and exit. We return 0 if the library could be loaded, | 229 // Test loading libcros and exit. We return 0 if the library could be loaded, |
230 // and 1 if it can't be. This is for validation that the library is installed | 230 // and 1 if it can't be. This is for validation that the library is installed |
231 // and versioned properly for Chrome to find. | 231 // and versioned properly for Chrome to find. |
232 if (command_line.HasSwitch(switches::kTestLoadLibcros)) | 232 if (command_line.HasSwitch(switches::kTestLoadLibcros)) |
233 exit(!chromeos::CrosLibrary::Get()->EnsureLoaded()); | 233 exit(!chromeos::CrosLibrary::Get()->libcros_loaded()); |
234 #endif | 234 #endif |
235 } | 235 } |
236 | 236 |
237 void AddFirstRunNewTabs(BrowserInit* browser_init, | 237 void AddFirstRunNewTabs(BrowserInit* browser_init, |
238 const std::vector<GURL>& new_tabs) { | 238 const std::vector<GURL>& new_tabs) { |
239 for (std::vector<GURL>::const_iterator it = new_tabs.begin(); | 239 for (std::vector<GURL>::const_iterator it = new_tabs.begin(); |
240 it != new_tabs.end(); ++it) { | 240 it != new_tabs.end(); ++it) { |
241 if (it->is_valid()) | 241 if (it->is_valid()) |
242 browser_init->AddFirstRunTab(*it); | 242 browser_init->AddFirstRunTab(*it); |
243 } | 243 } |
(...skipping 1842 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2086 if (env->GetVar(chrome::kPreReadEnvironmentVariable, &pre_read) && | 2086 if (env->GetVar(chrome::kPreReadEnvironmentVariable, &pre_read) && |
2087 (pre_read == "0" || pre_read == "1")) { | 2087 (pre_read == "0" || pre_read == "1")) { |
2088 std::string uma_name(name); | 2088 std::string uma_name(name); |
2089 uma_name += "_PreRead"; | 2089 uma_name += "_PreRead"; |
2090 uma_name += pre_read == "1" ? "Enabled" : "Disabled"; | 2090 uma_name += pre_read == "1" ? "Enabled" : "Disabled"; |
2091 AddPreReadHistogramTime(uma_name.c_str(), time); | 2091 AddPreReadHistogramTime(uma_name.c_str(), time); |
2092 } | 2092 } |
2093 #endif | 2093 #endif |
2094 #endif | 2094 #endif |
2095 } | 2095 } |
OLD | NEW |