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

Unified Diff: chrome/browser/push_messaging/push_messaging_browsertest.cc

Issue 1141613003: Push API: Include origin in generated app_ids (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ident_test
Patch Set: Simplify DCHECKs Created 5 years, 7 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/push_messaging/push_messaging_browsertest.cc
diff --git a/chrome/browser/push_messaging/push_messaging_browsertest.cc b/chrome/browser/push_messaging/push_messaging_browsertest.cc
index 6dab03aee9aca08952e47bcc9aa16a39fac387ea..5cd497da2d1ed9de6780eee1641b1607a1fd4644 100644
--- a/chrome/browser/push_messaging/push_messaging_browsertest.cc
+++ b/chrome/browser/push_messaging/push_messaging_browsertest.cc
@@ -246,8 +246,9 @@ PushMessagingAppIdentifier
PushMessagingBrowserTest::GetAppIdentifierForServiceWorkerRegistration(
int64 service_worker_registration_id) {
GURL origin = https_server()->GetURL(std::string()).GetOrigin();
- PushMessagingAppIdentifier app_identifier = PushMessagingAppIdentifier::Get(
- GetBrowser()->profile(), origin, service_worker_registration_id);
+ PushMessagingAppIdentifier app_identifier =
+ PushMessagingAppIdentifier::FindByServiceWorker(
+ GetBrowser()->profile(), origin, service_worker_registration_id);
EXPECT_FALSE(app_identifier.is_null());
return app_identifier;
}
@@ -1036,8 +1037,8 @@ IN_PROC_BROWSER_TEST_F(PushMessagingBrowserTest,
GetAppIdentifierForServiceWorkerRegistration(0LL);
EXPECT_EQ(app_identifier.app_id(), gcm_service()->last_registered_app_id());
PushMessagingAppIdentifier stored_app_identifier =
- PushMessagingAppIdentifier::Get(GetBrowser()->profile(),
- app_identifier.app_id());
+ PushMessagingAppIdentifier::FindByAppId(GetBrowser()->profile(),
+ app_identifier.app_id());
EXPECT_FALSE(stored_app_identifier.is_null());
// Simulate a user clearing site data (including Service Workers, crucially).
@@ -1063,8 +1064,8 @@ IN_PROC_BROWSER_TEST_F(PushMessagingBrowserTest,
// |app_identifier| should no longer be stored in prefs.
PushMessagingAppIdentifier stored_app_identifier2 =
- PushMessagingAppIdentifier::Get(GetBrowser()->profile(),
- app_identifier.app_id());
+ PushMessagingAppIdentifier::FindByAppId(GetBrowser()->profile(),
+ app_identifier.app_id());
EXPECT_TRUE(stored_app_identifier2.is_null());
}

Powered by Google App Engine
This is Rietveld 408576698