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

Unified Diff: chrome/browser/extensions/settings/settings_test_util.h

Issue 8670012: Extension Settings API: move the API functions into an object SettingsNamepace, (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/settings/settings_test_util.h
diff --git a/chrome/browser/extensions/settings/settings_test_util.h b/chrome/browser/extensions/settings/settings_test_util.h
index ce78a6e59b3032e4732f3b278d937210508e1865..822c73fe56670b473ea54944844e12b3e595dc7e 100644
--- a/chrome/browser/extensions/settings/settings_test_util.h
+++ b/chrome/browser/extensions/settings/settings_test_util.h
@@ -8,6 +8,8 @@
#include <string>
+#include "base/compiler_specific.h"
+#include "base/memory/linked_ptr.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "chrome/browser/extensions/extension_event_router.h"
@@ -69,19 +71,23 @@ class MockProfile : public TestingProfile {
// SettingsStorageFactory which acts as a wrapper for other factories.
class ScopedSettingsStorageFactory : public SettingsStorageFactory {
public:
- explicit ScopedSettingsStorageFactory(SettingsStorageFactory* delegate);
+ ScopedSettingsStorageFactory();
- virtual ~ScopedSettingsStorageFactory();
+ explicit ScopedSettingsStorageFactory(
+ const scoped_refptr<SettingsStorageFactory>& delegate);
// Sets the delegate factory (equivalent to scoped_ptr::reset).
- void Reset(SettingsStorageFactory* delegate);
+ void Reset(const scoped_refptr<SettingsStorageFactory>& delegate);
// SettingsStorageFactory implementation.
virtual SettingsStorage* Create(
const FilePath& base_path, const std::string& extension_id) OVERRIDE;
private:
- scoped_ptr<SettingsStorageFactory> delegate_;
+ // SettingsStorageFactory is refcounted.
+ virtual ~ScopedSettingsStorageFactory();
+
+ scoped_refptr<SettingsStorageFactory> delegate_;
};
} // namespace settings_test_util

Powered by Google App Engine
This is Rietveld 408576698