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

Unified Diff: chrome/browser/storage_monitor/test_storage_monitor.h

Issue 20003005: Fix remaining leaks in StorageMonitorLinux. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 5 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/test_storage_monitor.h
===================================================================
--- chrome/browser/storage_monitor/test_storage_monitor.h (revision 213177)
+++ chrome/browser/storage_monitor/test_storage_monitor.h (working copy)
@@ -22,12 +22,16 @@
void MarkInitialized();
// Create and initialize a new TestStorageMonitor and install it
- // in the TestingBrowserProcess.
+ // in the TestingBrowserProcess. The TestingBrowserProcess owns the created
+ // TestStorageMonitor, but it is also returned for convenience. If there is
+ // no TestingBrowserProcess to own the TestStorageMonitor, it is destroyed
+ // and the return value is NULL.
static TestStorageMonitor* CreateAndInstall();
// Create and initialize a new TestStorageMonitor, and install it
// in the BrowserProcessImpl. (Browser tests use the production browser
- // process implementation.)
+ // process implementation.) The BrowserProcessImpl owns the created
+ // TestStorageMonitor, but it is also returned for convenience.
static TestStorageMonitor* CreateForBrowserTests();
// Remove the singleton StorageMonitor from the TestingBrowserProcess.
@@ -61,9 +65,13 @@
const std::string& ejected_device() const { return ejected_device_; }
+ bool init_called() const { return init_called_; }
+
+ private:
+ // Whether TestStorageMonitor::Init() has been called for not.
bool init_called_;
- private:
+ // The last device to be ejected.
std::string ejected_device_;
#if defined(OS_LINUX)

Powered by Google App Engine
This is Rietveld 408576698