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

Unified Diff: chrome/browser/apps/ephemeral_app_browsertest.cc

Issue 1419823011: app_sorting() calls should go via ExtensionSystem intsead of prefs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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/apps/ephemeral_app_browsertest.cc
diff --git a/chrome/browser/apps/ephemeral_app_browsertest.cc b/chrome/browser/apps/ephemeral_app_browsertest.cc
index 61144b0700f4fc0c6ce501ed3fa13f95cfa66024..4ccac8a2a549e36788d02143d3d94cd1aeb26195 100644
--- a/chrome/browser/apps/ephemeral_app_browsertest.cc
+++ b/chrome/browser/apps/ephemeral_app_browsertest.cc
@@ -45,6 +45,7 @@
#include "ui/message_center/message_center.h"
#include "ui/message_center/notifier_settings.h"
+using extensions::AppSorting;
using extensions::Event;
using extensions::EventRouter;
using extensions::Extension;
@@ -376,8 +377,7 @@ class EphemeralAppBrowserTest : public EphemeralAppTestBase {
EXPECT_FALSE(sync_change.get());
// Ephemeral apps should not be assigned ordinals.
- extensions::AppSorting* app_sorting =
- ExtensionPrefs::Get(profile())->app_sorting();
+ AppSorting* app_sorting = ExtensionSystem::Get(profile())->app_sorting();
EXPECT_FALSE(app_sorting->GetAppLaunchOrdinal(app_id).IsValid());
EXPECT_FALSE(app_sorting->GetPageOrdinal(app_id).IsValid());
}
@@ -413,7 +413,7 @@ class EphemeralAppBrowserTest : public EphemeralAppTestBase {
Extension::DISABLE_INACTIVE_EPHEMERAL_APP);
// Check sort ordinals.
- extensions::AppSorting* app_sorting = prefs->app_sorting();
+ AppSorting* app_sorting = ExtensionSystem::Get(profile())->app_sorting();
EXPECT_TRUE(app_sorting->GetAppLaunchOrdinal(app_id).IsValid());
EXPECT_TRUE(app_sorting->GetPageOrdinal(app_id).IsValid());
}
@@ -504,8 +504,7 @@ class EphemeralAppBrowserTest : public EphemeralAppTestBase {
VerifyPromotedApp(app_id, expected_set);
// The sort ordinals from sync should not be overridden.
- ExtensionPrefs* prefs = ExtensionPrefs::Get(profile());
- extensions::AppSorting* app_sorting = prefs->app_sorting();
+ AppSorting* app_sorting = ExtensionSystem::Get(profile())->app_sorting();
EXPECT_TRUE(
app_sorting->GetAppLaunchOrdinal(app_id).Equals(kAppLaunchOrdinal));
EXPECT_TRUE(app_sorting->GetPageOrdinal(app_id).Equals(kPageOrdinal));

Powered by Google App Engine
This is Rietveld 408576698