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

Unified Diff: base/system_monitor/system_monitor.h

Issue 10905237: Fix a potential multi-thread issue when manipulating removable storage map (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: use mutable for lock Created 8 years, 3 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
« no previous file with comments | « no previous file | base/system_monitor/system_monitor.cc » ('j') | base/system_monitor/system_monitor.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/system_monitor/system_monitor.h
diff --git a/base/system_monitor/system_monitor.h b/base/system_monitor/system_monitor.h
index 48d512b708c11aa44368c05300dd9a38f29e00ed..f5224a460e2488e3cf723902f88c91c7abb3ca51 100644
--- a/base/system_monitor/system_monitor.h
+++ b/base/system_monitor/system_monitor.h
@@ -13,6 +13,7 @@
#include "base/basictypes.h"
#include "base/file_path.h"
#include "base/string16.h"
+#include "base/synchronization/lock.h"
#include "build/build_config.h"
// Windows HiRes timers drain the battery faster so we need to know the battery
@@ -219,6 +220,8 @@ class BASE_EXPORT SystemMonitor {
std::vector<id> notification_observers_;
#endif
+ // For manipulating removable_storage_map_ structure.
+ mutable base::Lock removable_storage_lock_;
// Map of all the attached removable storage devices.
RemovableStorageMap removable_storage_map_;
« no previous file with comments | « no previous file | base/system_monitor/system_monitor.cc » ('j') | base/system_monitor/system_monitor.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698