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

Unified Diff: chrome/browser/storage_monitor/storage_monitor_window_win.cc

Issue 12382005: Rename RemovableDeviceNotifications=>StorageMonitor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 10 months 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/storage_monitor/storage_monitor_window_win.cc
diff --git a/chrome/browser/storage_monitor/removable_device_notifications_window_win.cc b/chrome/browser/storage_monitor/storage_monitor_window_win.cc
similarity index 82%
rename from chrome/browser/storage_monitor/removable_device_notifications_window_win.cc
rename to chrome/browser/storage_monitor/storage_monitor_window_win.cc
index 7f60507fe2ebae0d6d7f5172705f4c2c8fada45e..28cc33555478b96092b2d336b52bb025721a581a 100644
--- a/chrome/browser/storage_monitor/removable_device_notifications_window_win.cc
+++ b/chrome/browser/storage_monitor/storage_monitor_window_win.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/storage_monitor/removable_device_notifications_window_win.h"
+#include "chrome/browser/storage_monitor/storage_monitor_window_win.h"
#include <windows.h>
#include <dbt.h>
@@ -26,14 +26,14 @@ const char16 kWindowClassName[] = L"Chrome_RemovableDeviceNotificationWindow";
// RemovableDeviceNotificationsWindowWin --------------------------------------
// static
-RemovableDeviceNotificationsWindowWin*
- RemovableDeviceNotificationsWindowWin::Create() {
- return new RemovableDeviceNotificationsWindowWin(
+StorageMonitorWindowWin*
+ StorageMonitorWindowWin::Create() {
+ return new StorageMonitorWindowWin(
new VolumeMountWatcherWin(), new PortableDeviceWatcherWin());
}
-RemovableDeviceNotificationsWindowWin::
- RemovableDeviceNotificationsWindowWin(
+StorageMonitorWindowWin::
+ StorageMonitorWindowWin(
VolumeMountWatcherWin* volume_mount_watcher,
PortableDeviceWatcherWin* portable_device_watcher)
: window_class_(0),
@@ -47,8 +47,8 @@ RemovableDeviceNotificationsWindowWin::
portable_device_watcher_->SetNotifications(receiver());
}
-RemovableDeviceNotificationsWindowWin::
- ~RemovableDeviceNotificationsWindowWin() {
+StorageMonitorWindowWin::
+ ~StorageMonitorWindowWin() {
volume_mount_watcher_->SetNotifications(NULL);
portable_device_watcher_->SetNotifications(NULL);
@@ -59,12 +59,12 @@ RemovableDeviceNotificationsWindowWin::
UnregisterClass(MAKEINTATOM(window_class_), instance_);
}
-void RemovableDeviceNotificationsWindowWin::Init() {
+void StorageMonitorWindowWin::Init() {
WNDCLASSEX window_class;
base::win::InitializeWindowClass(
kWindowClassName,
&base::win::WrappedWindowProc<
- RemovableDeviceNotificationsWindowWin::WndProcThunk>,
+ StorageMonitorWindowWin::WndProcThunk>,
0, 0, 0, NULL, NULL, NULL, NULL, NULL,
&window_class);
instance_ = window_class.hInstance;
@@ -78,7 +78,7 @@ void RemovableDeviceNotificationsWindowWin::Init() {
portable_device_watcher_->Init(window_);
}
-bool RemovableDeviceNotificationsWindowWin::GetStorageInfoForPath(
+bool StorageMonitorWindowWin::GetStorageInfoForPath(
const base::FilePath& path,
StorageInfo* device_info) const {
string16 location;
@@ -125,12 +125,12 @@ bool RemovableDeviceNotificationsWindowWin::GetStorageInfoForPath(
return true;
}
-uint64 RemovableDeviceNotificationsWindowWin::GetStorageSize(
+uint64 StorageMonitorWindowWin::GetStorageSize(
const base::FilePath::StringType& location) const {
return volume_mount_watcher_->GetStorageSize(location);
}
-bool RemovableDeviceNotificationsWindowWin::GetMTPStorageInfoFromDeviceId(
+bool StorageMonitorWindowWin::GetMTPStorageInfoFromDeviceId(
const std::string& storage_device_id,
string16* device_location,
string16* storage_object_id) const {
@@ -142,17 +142,17 @@ bool RemovableDeviceNotificationsWindowWin::GetMTPStorageInfoFromDeviceId(
}
// static
-LRESULT CALLBACK RemovableDeviceNotificationsWindowWin::WndProcThunk(
+LRESULT CALLBACK StorageMonitorWindowWin::WndProcThunk(
HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam) {
- RemovableDeviceNotificationsWindowWin* msg_wnd =
- reinterpret_cast<RemovableDeviceNotificationsWindowWin*>(
+ StorageMonitorWindowWin* msg_wnd =
+ reinterpret_cast<StorageMonitorWindowWin*>(
GetWindowLongPtr(hwnd, GWLP_USERDATA));
if (msg_wnd)
return msg_wnd->WndProc(hwnd, message, wparam, lparam);
return ::DefWindowProc(hwnd, message, wparam, lparam);
}
-LRESULT CALLBACK RemovableDeviceNotificationsWindowWin::WndProc(
+LRESULT CALLBACK StorageMonitorWindowWin::WndProc(
HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam) {
switch (message) {
case WM_DEVICECHANGE:
@@ -165,7 +165,7 @@ LRESULT CALLBACK RemovableDeviceNotificationsWindowWin::WndProc(
return ::DefWindowProc(hwnd, message, wparam, lparam);
}
-bool RemovableDeviceNotificationsWindowWin::GetDeviceInfo(
+bool StorageMonitorWindowWin::GetDeviceInfo(
const base::FilePath& device_path, string16* device_location,
std::string* unique_id, string16* name, bool* removable,
uint64* total_size_in_bytes) const {
@@ -177,7 +177,7 @@ bool RemovableDeviceNotificationsWindowWin::GetDeviceInfo(
total_size_in_bytes);
}
-void RemovableDeviceNotificationsWindowWin::OnDeviceChange(UINT event_type,
+void StorageMonitorWindowWin::OnDeviceChange(UINT event_type,
LPARAM data) {
volume_mount_watcher_->OnWindowMessage(event_type, data);
portable_device_watcher_->OnWindowMessage(event_type, data);

Powered by Google App Engine
This is Rietveld 408576698