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

Unified Diff: chrome/browser/extensions/extension_disabled_ui_browsertest.cc

Issue 156843004: Remove ExtensionService::extension_prefs() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: additional cleanup Created 6 years, 10 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/extensions/extension_disabled_ui_browsertest.cc
diff --git a/chrome/browser/extensions/extension_disabled_ui_browsertest.cc b/chrome/browser/extensions/extension_disabled_ui_browsertest.cc
index 924d086999cb34df835cf824c2e6aa6e619d437c..bcae066859c6671b4abab0b4139df020857a25b0 100644
--- a/chrome/browser/extensions/extension_disabled_ui_browsertest.cc
+++ b/chrome/browser/extensions/extension_disabled_ui_browsertest.cc
@@ -25,6 +25,7 @@
#include "net/url_request/url_fetcher.h"
using extensions::Extension;
+using extensions::ExtensionPrefs;
class ExtensionDisabledGlobalErrorTest : public ExtensionBrowserTest {
protected:
@@ -149,7 +150,8 @@ IN_PROC_BROWSER_TEST_F(ExtensionDisabledGlobalErrorTest,
const Extension* extension = InstallIncreasingPermissionExtensionV1();
DisableExtension(extension->id());
// Clear disable reason to simulate legacy disables.
- service_->extension_prefs()->ClearDisableReasons(extension->id());
+ ExtensionPrefs::Get(service_->profile())->
James Cook 2014/02/07 00:53:02 nit: I would use browser()->profile() here, in the
Ken Rockot(use gerrit already) 2014/02/10 18:53:02 Done.
+ ClearDisableReasons(extension->id());
// Upgrade to version 2. Infer from version 1 having the same permissions
// granted by the user that it was disabled by the user.
extension = UpdateIncreasingPermissionExtension(extension, path_v2_, 0);
@@ -163,7 +165,8 @@ IN_PROC_BROWSER_TEST_F(ExtensionDisabledGlobalErrorTest,
UnknownReasonHigherPermissions) {
const Extension* extension = InstallAndUpdateIncreasingPermissionsExtension();
// Clear disable reason to simulate legacy disables.
- service_->extension_prefs()->ClearDisableReasons(extension->id());
+ ExtensionPrefs::Get(service_->profile())->
+ ClearDisableReasons(extension->id());
// We now have version 2 but only accepted permissions for version 1.
GlobalError* error = GetExtensionDisabledGlobalError();
ASSERT_TRUE(error);
@@ -222,6 +225,7 @@ IN_PROC_BROWSER_TEST_F(ExtensionDisabledGlobalErrorTest,
EXPECT_EQ("2", extension->VersionString());
EXPECT_EQ(1u, service_->disabled_extensions()->size());
EXPECT_EQ(Extension::DISABLE_PERMISSIONS_INCREASE,
- service_->extension_prefs()->GetDisableReasons(extension_id));
+ ExtensionPrefs::Get(service_->profile())->
+ GetDisableReasons(extension_id));
EXPECT_TRUE(GetExtensionDisabledGlobalError());
}

Powered by Google App Engine
This is Rietveld 408576698