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

Side by Side Diff: chrome/browser/system_monitor/volume_mount_watcher_win.cc

Issue 11339036: Temporarily disable adding already attached removable devices to system monitor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: typo Created 8 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
« no previous file with comments | « chrome/browser/system_monitor/removable_device_notifications_window_win_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/system_monitor/volume_mount_watcher_win.h" 5 #include "chrome/browser/system_monitor/volume_mount_watcher_win.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 #include <dbt.h> 8 #include <dbt.h>
9 #include <fileapi.h> 9 #include <fileapi.h>
10 10
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 99
100 namespace chrome { 100 namespace chrome {
101 101
102 VolumeMountWatcherWin::VolumeMountWatcherWin() { 102 VolumeMountWatcherWin::VolumeMountWatcherWin() {
103 } 103 }
104 104
105 void VolumeMountWatcherWin::Init() { 105 void VolumeMountWatcherWin::Init() {
106 // When VolumeMountWatcherWin is created, the message pumps are not running 106 // When VolumeMountWatcherWin is created, the message pumps are not running
107 // so a posted task from the constructor would never run. Therefore, do all 107 // so a posted task from the constructor would never run. Therefore, do all
108 // the initializations here. 108 // the initializations here.
109 BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE, base::Bind( 109 //
110 &VolumeMountWatcherWin::AddExistingDevicesOnFileThread, this)); 110 // This should call AddExistingDevicesOnFileThread. The call is disabled
111 // until a fix for http://crbug.com/155910 can land.
112 // BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE, base::Bind(
113 // &VolumeMountWatcherWin::AddExistingDevicesOnFileThread, this));
111 } 114 }
112 115
113 bool VolumeMountWatcherWin::GetDeviceInfo(const FilePath& device_path, 116 bool VolumeMountWatcherWin::GetDeviceInfo(const FilePath& device_path,
114 string16* device_location, std::string* unique_id, string16* name, 117 string16* device_location, std::string* unique_id, string16* name,
115 bool* removable) { 118 bool* removable) {
116 return GetDeviceDetails(device_path, device_location, unique_id, name, 119 return GetDeviceDetails(device_path, device_location, unique_id, name,
117 removable); 120 removable);
118 } 121 }
119 122
120 void VolumeMountWatcherWin::OnWindowMessage(UINT event_type, LPARAM data) { 123 void VolumeMountWatcherWin::OnWindowMessage(UINT event_type, LPARAM data) {
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 if (device_info == device_ids_.end()) 240 if (device_info == device_ids_.end())
238 return; 241 return;
239 242
240 SystemMonitor* monitor = SystemMonitor::Get(); 243 SystemMonitor* monitor = SystemMonitor::Get();
241 if (monitor) 244 if (monitor)
242 monitor->ProcessRemovableStorageDetached(device_info->second); 245 monitor->ProcessRemovableStorageDetached(device_info->second);
243 device_ids_.erase(device_info); 246 device_ids_.erase(device_info);
244 } 247 }
245 248
246 } // namespace chrome 249 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/system_monitor/removable_device_notifications_window_win_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698