diff options
author | yoz@chromium.org <yoz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-15 09:21:12 +0000 |
---|---|---|
committer | yoz@chromium.org <yoz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-15 09:21:12 +0000 |
commit | 2d30d04ecb2e82011ce317f855967cf7f4cc5213 (patch) | |
tree | 9c1a640683e27200139fe15f04a90dd0f52fc919 /chrome/browser/ui | |
parent | 08d7b2796ca0ee39154410a76fb298e1bda23fea (diff) | |
download | chromium_src-2d30d04ecb2e82011ce317f855967cf7f4cc5213.zip chromium_src-2d30d04ecb2e82011ce317f855967cf7f4cc5213.tar.gz chromium_src-2d30d04ecb2e82011ce317f855967cf7f4cc5213.tar.bz2 |
Make ExtensionPrefs a ProfileKeyedService.
BUG=178218
TBR=asargent@chromium.org
Review URL: https://chromiumcodereview.appspot.com/14999009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@200220 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ui')
-rw-r--r-- | chrome/browser/ui/panels/base_panel_browser_test.cc | 10 | ||||
-rw-r--r-- | chrome/browser/ui/panels/panel_browsertest.cc | 4 | ||||
-rw-r--r-- | chrome/browser/ui/panels/stacked_panel_browsertest.cc | 4 |
3 files changed, 8 insertions, 10 deletions
diff --git a/chrome/browser/ui/panels/base_panel_browser_test.cc b/chrome/browser/ui/panels/base_panel_browser_test.cc index 5c4da16..4cce306 100644 --- a/chrome/browser/ui/panels/base_panel_browser_test.cc +++ b/chrome/browser/ui/panels/base_panel_browser_test.cc @@ -10,6 +10,7 @@ #include "base/message_loop.h" #include "base/path_service.h" #include "base/strings/string_number_conversions.h" +#include "chrome/browser/extensions/extension_prefs.h" #include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/ui/browser.h" @@ -456,12 +457,9 @@ scoped_refptr<Extension> BasePanelBrowserTest::CreateExtension( const base::FilePath::StringType& path, extensions::Manifest::Location location, const DictionaryValue& extra_value) { -#if defined(OS_WIN) - base::FilePath full_path(FILE_PATH_LITERAL("c:\\")); -#else - base::FilePath full_path(FILE_PATH_LITERAL("/")); -#endif - full_path = full_path.Append(path); + extensions::ExtensionPrefs* extension_prefs = + extensions::ExtensionPrefs::Get(browser()->profile()); + base::FilePath full_path = extension_prefs->install_directory().Append(path); scoped_ptr<DictionaryValue> input_value(extra_value.DeepCopy()); input_value->SetString(extension_manifest_keys::kVersion, "1.0.0.0"); diff --git a/chrome/browser/ui/panels/panel_browsertest.cc b/chrome/browser/ui/panels/panel_browsertest.cc index d0ee3db..dd39bf1 100644 --- a/chrome/browser/ui/panels/panel_browsertest.cc +++ b/chrome/browser/ui/panels/panel_browsertest.cc @@ -1454,7 +1454,7 @@ IN_PROC_BROWSER_TEST_F(PanelBrowserTest, DictionaryValue empty_value; scoped_refptr<extensions::Extension> extension = CreateExtension(FILE_PATH_LITERAL("TestExtension"), - extensions::Manifest::INVALID_LOCATION, empty_value); + extensions::Manifest::INTERNAL, empty_value); std::string extension_app_name = web_app::GenerateApplicationNameFromExtensionId(extension->id()); @@ -1480,7 +1480,7 @@ IN_PROC_BROWSER_TEST_F(PanelBrowserTest, // Create another extension and a panel from that extension. scoped_refptr<extensions::Extension> extension_other = CreateExtension(FILE_PATH_LITERAL("TestExtensionOther"), - extensions::Manifest::INVALID_LOCATION, empty_value); + extensions::Manifest::INTERNAL, empty_value); std::string extension_app_name_other = web_app::GenerateApplicationNameFromExtensionId(extension_other->id()); Panel* panel_other = CreatePanel(extension_app_name_other); diff --git a/chrome/browser/ui/panels/stacked_panel_browsertest.cc b/chrome/browser/ui/panels/stacked_panel_browsertest.cc index f1eebe2..e019ee2 100644 --- a/chrome/browser/ui/panels/stacked_panel_browsertest.cc +++ b/chrome/browser/ui/panels/stacked_panel_browsertest.cc @@ -988,12 +988,12 @@ IN_PROC_BROWSER_TEST_F(StackedPanelBrowserTest, DictionaryValue empty_value; scoped_refptr<extensions::Extension> extension1 = CreateExtension(FILE_PATH_LITERAL("TestExtension1"), - extensions::Manifest::INVALID_LOCATION, empty_value); + extensions::Manifest::INTERNAL, empty_value); std::string extension1_app_name = web_app::GenerateApplicationNameFromExtensionId(extension1->id()); scoped_refptr<extensions::Extension> extension2 = CreateExtension(FILE_PATH_LITERAL("TestExtension2"), - extensions::Manifest::INVALID_LOCATION, empty_value); + extensions::Manifest::INTERNAL, empty_value); std::string extension2_app_name = web_app::GenerateApplicationNameFromExtensionId(extension2->id()); |