Chromium Code Reviews| 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/chrome_browser_main_linux.h" | 5 #include "chrome/browser/chrome_browser_main_linux.h" |
| 6 | 6 |
| 7 #include "chrome/browser/system_monitor/media_transfer_protocol_device_observer_ linux.h" | 7 #include "chrome/browser/system_monitor/media_transfer_protocol_device_observer_ linux.h" |
| 8 #include "device/media_transfer_protocol/media_transfer_protocol_manager.h" | 8 #include "device/media_transfer_protocol/media_transfer_protocol_manager.h" |
| 9 | 9 |
| 10 #if !defined(OS_CHROMEOS) | 10 #if !defined(OS_CHROMEOS) |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 139 #endif | 139 #endif |
| 140 | 140 |
| 141 device::MediaTransferProtocolManager::Initialize(); | 141 device::MediaTransferProtocolManager::Initialize(); |
| 142 | 142 |
| 143 did_pre_profile_init_ = true; | 143 did_pre_profile_init_ = true; |
| 144 | 144 |
| 145 ChromeBrowserMainPartsPosix::PreProfileInit(); | 145 ChromeBrowserMainPartsPosix::PreProfileInit(); |
| 146 } | 146 } |
| 147 | 147 |
| 148 void ChromeBrowserMainPartsLinux::PostProfileInit() { | 148 void ChromeBrowserMainPartsLinux::PostProfileInit() { |
| 149 media_transfer_protocol_device_observer_.reset( | 149 media_transfer_protocol_device_observer_.reset( |
|
vandebo (ex-Chrome)
2013/01/31 23:51:29
Add a todo to make MediaTransferProtocolDeviceObse
Greg Billock
2013/02/01 18:28:42
Done.
| |
| 150 new chrome::MediaTransferProtocolDeviceObserverLinux()); | 150 new chrome::MediaTransferProtocolDeviceObserverLinux()); |
| 151 media_transfer_protocol_device_observer_->SetNotifications( | |
| 152 chrome::RemovableStorageNotifications::GetInstance()->receiver_.get()); | |
| 151 | 153 |
| 152 ChromeBrowserMainPartsPosix::PostProfileInit(); | 154 ChromeBrowserMainPartsPosix::PostProfileInit(); |
| 153 } | 155 } |
| 154 | 156 |
| 155 void ChromeBrowserMainPartsLinux::PostMainMessageLoopRun() { | 157 void ChromeBrowserMainPartsLinux::PostMainMessageLoopRun() { |
| 156 #if !defined(OS_CHROMEOS) | 158 #if !defined(OS_CHROMEOS) |
| 157 // Release it now. Otherwise the FILE thread would be gone when we try to | 159 // Release it now. Otherwise the FILE thread would be gone when we try to |
| 158 // release it in the dtor and Valgrind would report a leak on almost ever | 160 // release it in the dtor and Valgrind would report a leak on almost ever |
| 159 // single browser_test. | 161 // single browser_test. |
| 160 removable_device_notifications_linux_ = NULL; | 162 removable_device_notifications_linux_ = NULL; |
| 161 #endif | 163 #endif |
| 162 | 164 |
| 163 media_transfer_protocol_device_observer_.reset(); | 165 media_transfer_protocol_device_observer_.reset(); |
| 164 | 166 |
| 165 ChromeBrowserMainPartsPosix::PostMainMessageLoopRun(); | 167 ChromeBrowserMainPartsPosix::PostMainMessageLoopRun(); |
| 166 } | 168 } |
| OLD | NEW |