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

Unified Diff: chrome/browser/ui/cocoa/extensions/extension_popup_controller_unittest.mm

Issue 7189029: Implement an initial extension settings API. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Make clang happy Created 9 years, 4 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 | « chrome/browser/profiles/profile_impl.cc ('k') | chrome/chrome.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/extensions/extension_popup_controller_unittest.mm
diff --git a/chrome/browser/ui/cocoa/extensions/extension_popup_controller_unittest.mm b/chrome/browser/ui/cocoa/extensions/extension_popup_controller_unittest.mm
index ac1ef0ed6b186a0fd5273d0b8a52647453842f19..8c15bee74ba67c178f543a38b28cb6f75df37b5b 100644
--- a/chrome/browser/ui/cocoa/extensions/extension_popup_controller_unittest.mm
+++ b/chrome/browser/ui/cocoa/extensions/extension_popup_controller_unittest.mm
@@ -8,6 +8,7 @@
#include "chrome/browser/extensions/extension_prefs.h"
#include "chrome/browser/extensions/extension_process_manager.h"
#include "chrome/browser/extensions/extension_service.h"
+#include "chrome/browser/extensions/extension_settings.h"
#include "chrome/browser/ui/cocoa/browser_test_helper.h"
#include "chrome/browser/ui/cocoa/cocoa_test_helper.h"
#include "chrome/browser/ui/cocoa/extensions/extension_popup_controller.h"
@@ -23,6 +24,10 @@ class ExtensionTestingProfile : public TestingProfile {
return GetPath().AppendASCII(ExtensionService::kInstallDirectoryName);
}
+ FilePath GetExtensionsSettingsDir() {
+ return GetPath().AppendASCII(ExtensionService::kSettingsDirectoryName);
+ }
+
void InitExtensionProfile() {
DCHECK(!GetExtensionProcessManager());
DCHECK(!GetExtensionService());
@@ -32,10 +37,12 @@ class ExtensionTestingProfile : public TestingProfile {
extension_prefs_.reset(new ExtensionPrefs(GetPrefs(),
GetExtensionsInstallDir(),
extension_pref_value_map_.get()));
+ extension_settings_ = new ExtensionSettings(GetExtensionsSettingsDir());
service_.reset(new ExtensionService(this,
CommandLine::ForCurrentProcess(),
GetExtensionsInstallDir(),
extension_prefs_.get(),
+ extension_settings_.get(),
false,
true));
service_->set_extensions_enabled(true);
@@ -48,6 +55,7 @@ class ExtensionTestingProfile : public TestingProfile {
manager_.reset();
service_.reset();
extension_prefs_.reset();
+ extension_settings_ = NULL;
}
virtual ExtensionProcessManager* GetExtensionProcessManager() {
@@ -61,6 +69,7 @@ class ExtensionTestingProfile : public TestingProfile {
private:
scoped_ptr<ExtensionProcessManager> manager_;
scoped_ptr<ExtensionPrefs> extension_prefs_;
+ scoped_refptr<ExtensionSettings> extension_settings_;
scoped_ptr<ExtensionService> service_;
scoped_ptr<ExtensionPrefValueMap> extension_pref_value_map_;
« no previous file with comments | « chrome/browser/profiles/profile_impl.cc ('k') | chrome/chrome.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698