Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(206)

Side by Side Diff: chrome/browser/chrome_browser_main.cc

Issue 8588006: Eliminate CrosLibrary::EnsureLoaded (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/automation/testing_automation_provider_chromeos.cc ('k') | chrome/browser/chromeos/cros/cros_library.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698