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 // Crash on libc double-close() for http://crbug.com/660960. |
373 // http://crbug.com/660960. | |
374 // TODO(xiyuan): Remove this. | 373 // TODO(xiyuan): Remove this. |
375 if (chrome::GetChannel() == version_info::Channel::CANARY || | 374 if (chrome::GetChannel() == version_info::Channel::DEV || |
| 375 chrome::GetChannel() == version_info::Channel::CANARY || |
376 chrome::GetChannel() == version_info::Channel::UNKNOWN) { | 376 chrome::GetChannel() == version_info::Channel::UNKNOWN) { |
377 chromeos::InitCloseTracking(); | 377 chromeos::InitCloseTracking(); |
378 } | 378 } |
379 | 379 |
380 ChromeBrowserMainPartsLinux::PreEarlyInitialization(); | 380 ChromeBrowserMainPartsLinux::PreEarlyInitialization(); |
381 } | 381 } |
382 | 382 |
383 void ChromeBrowserMainPartsChromeos::PreMainMessageLoopStart() { | 383 void ChromeBrowserMainPartsChromeos::PreMainMessageLoopStart() { |
384 // Replace the default NetworkChangeNotifierFactory with ChromeOS specific | 384 // Replace the default NetworkChangeNotifierFactory with ChromeOS specific |
385 // implementation. This must be done before BrowserMainLoop calls | 385 // implementation. This must be done before BrowserMainLoop calls |
(...skipping 554 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
940 | 940 |
941 ChromeBrowserMainPartsLinux::PostDestroyThreads(); | 941 ChromeBrowserMainPartsLinux::PostDestroyThreads(); |
942 | 942 |
943 // Destroy DeviceSettingsService after g_browser_process. | 943 // Destroy DeviceSettingsService after g_browser_process. |
944 DeviceSettingsService::Shutdown(); | 944 DeviceSettingsService::Shutdown(); |
945 | 945 |
946 chromeos::ShutdownCloseTracking(); | 946 chromeos::ShutdownCloseTracking(); |
947 } | 947 } |
948 | 948 |
949 } // namespace chromeos | 949 } // namespace chromeos |
OLD | NEW |