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