OLD | NEW |
---|---|
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <utility> | 10 #include <utility> |
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
362 const char kChromeOSReleaseTrack[] = "CHROMEOS_RELEASE_TRACK"; | 362 const char kChromeOSReleaseTrack[] = "CHROMEOS_RELEASE_TRACK"; |
363 std::string channel; | 363 std::string channel; |
364 if (base::SysInfo::GetLsbReleaseValue(kChromeOSReleaseTrack, &channel)) | 364 if (base::SysInfo::GetLsbReleaseValue(kChromeOSReleaseTrack, &channel)) |
365 chrome::SetChannel(channel); | 365 chrome::SetChannel(channel); |
366 #endif | 366 #endif |
367 | 367 |
368 // Start monitoring OOM kills. | 368 // Start monitoring OOM kills. |
369 memory_kills_monitor_ = base::MakeUnique<memory::MemoryKillsMonitor::Handle>( | 369 memory_kills_monitor_ = base::MakeUnique<memory::MemoryKillsMonitor::Handle>( |
370 memory::MemoryKillsMonitor::StartMonitoring()); | 370 memory::MemoryKillsMonitor::StartMonitoring()); |
371 | 371 |
372 // Enable libc close tracking in browser process on unknown/canary channel for | 372 // Enable libc close tracking in browser process on unknown/canary channel for |
Daniel Erat
2017/02/14 23:01:11
nit: update this comment (maybe to omit the channe
xiyuan
2017/02/14 23:32:42
Good point. Done.
| |
373 // http://crbug.com/660960. | 373 // http://crbug.com/660960. |
374 // TODO(xiyuan): Remove this. | 374 // TODO(xiyuan): Remove this. |
375 if (chrome::GetChannel() == version_info::Channel::CANARY || | 375 if (chrome::GetChannel() == version_info::Channel::DEV || |
376 chrome::GetChannel() == version_info::Channel::CANARY || | |
376 chrome::GetChannel() == version_info::Channel::UNKNOWN) { | 377 chrome::GetChannel() == version_info::Channel::UNKNOWN) { |
377 chromeos::InitCloseTracking(); | 378 chromeos::InitCloseTracking(); |
378 } | 379 } |
379 | 380 |
380 ChromeBrowserMainPartsLinux::PreEarlyInitialization(); | 381 ChromeBrowserMainPartsLinux::PreEarlyInitialization(); |
381 } | 382 } |
382 | 383 |
383 void ChromeBrowserMainPartsChromeos::PreMainMessageLoopStart() { | 384 void ChromeBrowserMainPartsChromeos::PreMainMessageLoopStart() { |
384 // Replace the default NetworkChangeNotifierFactory with ChromeOS specific | 385 // Replace the default NetworkChangeNotifierFactory with ChromeOS specific |
385 // implementation. This must be done before BrowserMainLoop calls | 386 // implementation. This must be done before BrowserMainLoop calls |
(...skipping 554 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
940 | 941 |
941 ChromeBrowserMainPartsLinux::PostDestroyThreads(); | 942 ChromeBrowserMainPartsLinux::PostDestroyThreads(); |
942 | 943 |
943 // Destroy DeviceSettingsService after g_browser_process. | 944 // Destroy DeviceSettingsService after g_browser_process. |
944 DeviceSettingsService::Shutdown(); | 945 DeviceSettingsService::Shutdown(); |
945 | 946 |
946 chromeos::ShutdownCloseTracking(); | 947 chromeos::ShutdownCloseTracking(); |
947 } | 948 } |
948 | 949 |
949 } // namespace chromeos | 950 } // namespace chromeos |
OLD | NEW |