| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/chromeos/chrome_browser_main_chromeos.h" | 5 #include "chrome/browser/chromeos/chrome_browser_main_chromeos.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 237 browser_defaults::bookmarks_enabled = false; | 237 browser_defaults::bookmarks_enabled = false; |
| 238 } | 238 } |
| 239 | 239 |
| 240 ChromeBrowserMainPartsLinux::PreEarlyInitialization(); | 240 ChromeBrowserMainPartsLinux::PreEarlyInitialization(); |
| 241 } | 241 } |
| 242 | 242 |
| 243 void ChromeBrowserMainPartsChromeos::PreMainMessageLoopStart() { | 243 void ChromeBrowserMainPartsChromeos::PreMainMessageLoopStart() { |
| 244 // Initialize CrosLibrary only for the browser, unless running tests | 244 // Initialize CrosLibrary only for the browser, unless running tests |
| 245 // (which do their own CrosLibrary setup). | 245 // (which do their own CrosLibrary setup). |
| 246 if (!parameters().ui_task) { | 246 if (!parameters().ui_task) { |
| 247 bool use_stub = parameters().command_line.HasSwitch(switches::kStubCros); | 247 const bool use_stub = !base::chromeos::IsRunningOnChromeOS(); |
| 248 chromeos::CrosLibrary::Initialize(use_stub); | 248 chromeos::CrosLibrary::Initialize(use_stub); |
| 249 } | 249 } |
| 250 // Replace the default NetworkChangeNotifierFactory with ChromeOS specific | 250 // Replace the default NetworkChangeNotifierFactory with ChromeOS specific |
| 251 // implementation. | 251 // implementation. |
| 252 net::NetworkChangeNotifier::SetFactory( | 252 net::NetworkChangeNotifier::SetFactory( |
| 253 new chromeos::CrosNetworkChangeNotifierFactory()); | 253 new chromeos::CrosNetworkChangeNotifierFactory()); |
| 254 | 254 |
| 255 ChromeBrowserMainPartsLinux::PreMainMessageLoopStart(); | 255 ChromeBrowserMainPartsLinux::PreMainMessageLoopStart(); |
| 256 } | 256 } |
| 257 | 257 |
| (...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 556 LOG(WARNING) << "low_mem: Part of '100MB' experiment"; | 556 LOG(WARNING) << "low_mem: Part of '100MB' experiment"; |
| 557 chromeos::LowMemoryObserver::SetLowMemoryMargin(100); | 557 chromeos::LowMemoryObserver::SetLowMemoryMargin(100); |
| 558 } else if (trial->group() == margin_200mb) { | 558 } else if (trial->group() == margin_200mb) { |
| 559 LOG(WARNING) << "low_mem: Part of '200MB' experiment"; | 559 LOG(WARNING) << "low_mem: Part of '200MB' experiment"; |
| 560 chromeos::LowMemoryObserver::SetLowMemoryMargin(200); | 560 chromeos::LowMemoryObserver::SetLowMemoryMargin(200); |
| 561 } else { | 561 } else { |
| 562 LOG(WARNING) << "low_mem: Part of 'default' experiment"; | 562 LOG(WARNING) << "low_mem: Part of 'default' experiment"; |
| 563 } | 563 } |
| 564 } | 564 } |
| 565 } | 565 } |
| OLD | NEW |