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

Unified Diff: trunk/src/chrome/browser/metrics/variations/variations_http_header_provider.cc

Issue 101113004: Revert 239759 "The comment in base64.h implies that base::Base64..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years 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: trunk/src/chrome/browser/metrics/variations/variations_http_header_provider.cc
===================================================================
--- trunk/src/chrome/browser/metrics/variations/variations_http_header_provider.cc (revision 239920)
+++ trunk/src/chrome/browser/metrics/variations/variations_http_header_provider.cc (working copy)
@@ -163,12 +163,16 @@
proto.SerializeToString(&serialized);
std::string hashed;
- base::Base64Encode(serialized, &hashed);
- // If successful, swap the header value with the new one.
- // Note that the list of IDs and the header could be temporarily out of sync
- // if IDs are added as the header is recreated. The receiving servers are OK
- // with such discrepancies.
- variation_ids_header_ = hashed;
+ if (base::Base64Encode(serialized, &hashed)) {
+ // If successful, swap the header value with the new one.
+ // Note that the list of IDs and the header could be temporarily out of sync
+ // if IDs are added as the header is recreated. The receiving servers are OK
+ // with such discrepancies.
+ variation_ids_header_ = hashed;
+ } else {
+ NOTREACHED() << "Failed to base64 encode Variation IDs value: "
+ << serialized;
+ }
}
// static

Powered by Google App Engine
This is Rietveld 408576698