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

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

Issue 1906723003: Unify UUID/GUID generation code across base and blink (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use uppercase GUID for push messaging for crbug.com/461867 Created 4 years, 8 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_app_identifier.cc
diff --git a/chrome/browser/push_messaging/push_messaging_app_identifier.cc b/chrome/browser/push_messaging/push_messaging_app_identifier.cc
index d4f7e7063188aadd5c5ab6cedf9ebfeba8b1cc0b..ece6b7a1d9817b67a8f932227bfd072b5b1e7633 100644
--- a/chrome/browser/push_messaging/push_messaging_app_identifier.cc
+++ b/chrome/browser/push_messaging/push_messaging_app_identifier.cc
@@ -66,7 +66,9 @@ void PushMessagingAppIdentifier::RegisterProfilePrefs(
PushMessagingAppIdentifier PushMessagingAppIdentifier::Generate(
const GURL& origin,
int64_t service_worker_registration_id) {
- std::string guid = base::GenerateGUID();
+ // Always use the uppercased GUID to to make the case mangling handling
johnme 2016/04/22 12:02:27 Nit: Keeping these uppercase makes sense, but the
kinuko 2016/04/25 14:24:37 Done.
+ // easier (see the code commented with crbug.com/461867).
+ std::string guid = base::ToUpperASCII(base::GenerateGUID());
CHECK(!guid.empty());
std::string app_id =
kPushMessagingAppIdentifierPrefix + origin.spec() + kSeparator + guid;
« base/guid.cc ('K') | « base/guid_win.cc ('k') | third_party/WebKit/Source/platform/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698