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

Unified Diff: chrome/browser/chromeos/usb_mount_observer.h

Issue 5711001: Add a new GetInstance() method for remaining files with singleton classes under chrome/browser. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 10 years 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/chromeos/usb_mount_observer.h
diff --git a/chrome/browser/chromeos/usb_mount_observer.h b/chrome/browser/chromeos/usb_mount_observer.h
index 5f30b3109fce8712613ecc751c134d9731e9d761..8b55fbbfc79587075734ac859f86ba02cba207de 100644
--- a/chrome/browser/chromeos/usb_mount_observer.h
+++ b/chrome/browser/chromeos/usb_mount_observer.h
@@ -9,6 +9,7 @@
#include <string>
#include <vector>
+#include "base/singleton.h"
joth 2010/12/09 15:06:40 remove, fwd declare traits
#include "chrome/browser/chromeos/cros/mount_library.h"
#include "chrome/common/notification_observer.h"
#include "chrome/common/notification_registrar.h"
@@ -31,12 +32,8 @@ class USBMountObserver : public chromeos::MountLibrary::Observer,
std::string mount_path;
};
- USBMountObserver() {}
- ~USBMountObserver() {}
+ static USBMountObserver* Get();
- static USBMountObserver* Get() {
- return Singleton<USBMountObserver>::get();
- }
void Observe(NotificationType type,
const NotificationSource& source,
const NotificationDetails& details);
@@ -48,9 +45,13 @@ class USBMountObserver : public chromeos::MountLibrary::Observer,
void ScanForDevices(chromeos::MountLibrary* obj);
private:
+ friend struct DefaultSingletonTraits<USBMountObserver>;
typedef std::vector<BrowserWithPath>::iterator BrowserIterator;
BrowserIterator FindBrowserForPath(const std::string& path);
+ USBMountObserver() {}
+ ~USBMountObserver() {}
+
void RemoveBrowserFromVector(const std::string& path);
// Used to create a window of a standard size, and add it to a list

Powered by Google App Engine
This is Rietveld 408576698