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

Unified Diff: chrome/common/metrics/variations/experiment_labels.cc

Issue 93793010: Update uses of UTF conversions in chrome/common to use the base:: namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
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
« no previous file with comments | « chrome/common/logging_chrome.cc ('k') | chrome/common/metrics/variations/experiment_labels_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/metrics/variations/experiment_labels.cc
diff --git a/chrome/common/metrics/variations/experiment_labels.cc b/chrome/common/metrics/variations/experiment_labels.cc
index e0e036b66c4aa8494af28535528dc4c0e91a7a19..489c9c367c53f56550cc66a43dd522f3016211f3 100644
--- a/chrome/common/metrics/variations/experiment_labels.cc
+++ b/chrome/common/metrics/variations/experiment_labels.cc
@@ -26,14 +26,14 @@ base::string16 CreateSingleExperimentLabel(int count, VariationID id,
const base::Time& current_time) {
// Build the parts separately so they can be validated.
const base::string16 key =
- ASCIIToUTF16(kVariationPrefix) + base::IntToString16(count);
+ base::ASCIIToUTF16(kVariationPrefix) + base::IntToString16(count);
DCHECK_LE(key.size(), 8U);
const base::string16 value = base::IntToString16(id);
DCHECK_LE(value.size(), 8U);
base::string16 label(key);
- label += ASCIIToUTF16("=");
+ label += base::ASCIIToUTF16("=");
label += value;
- label += ASCIIToUTF16("|");
+ label += base::ASCIIToUTF16("|");
label += installer::BuildExperimentDateString(current_time);
return label;
}
@@ -56,8 +56,10 @@ base::string16 BuildGoogleUpdateExperimentLabel(
if (id == EMPTY_ID)
continue;
- if (!experiment_labels.empty())
- experiment_labels += ASCIIToUTF16(google_update::kExperimentLabelSep);
+ if (!experiment_labels.empty()) {
+ experiment_labels +=
+ base::ASCIIToUTF16(google_update::kExperimentLabelSep);
+ }
experiment_labels += CreateSingleExperimentLabel(++counter, id,
current_time);
}
@@ -67,7 +69,7 @@ base::string16 BuildGoogleUpdateExperimentLabel(
base::string16 ExtractNonVariationLabels(const base::string16& labels) {
const base::string16 separator =
- ASCIIToUTF16(google_update::kExperimentLabelSep);
+ base::ASCIIToUTF16(google_update::kExperimentLabelSep);
base::string16 non_variation_labels;
// First, split everything by the label separator.
@@ -77,8 +79,10 @@ base::string16 ExtractNonVariationLabels(const base::string16& labels) {
// For each label, keep the ones that do not look like a Variations label.
for (std::vector<base::string16>::const_iterator it = entries.begin();
it != entries.end(); ++it) {
- if (it->empty() || StartsWith(*it, ASCIIToUTF16(kVariationPrefix), false))
+ if (it->empty() ||
+ StartsWith(*it, base::ASCIIToUTF16(kVariationPrefix), false)) {
continue;
+ }
// Dump the whole thing, including the timestamp.
if (!non_variation_labels.empty())
@@ -92,7 +96,7 @@ base::string16 ExtractNonVariationLabels(const base::string16& labels) {
base::string16 CombineExperimentLabels(const base::string16& variation_labels,
const base::string16& other_labels) {
const base::string16 separator =
- ASCIIToUTF16(google_update::kExperimentLabelSep);
+ base::ASCIIToUTF16(google_update::kExperimentLabelSep);
DCHECK(!StartsWith(variation_labels, separator, false));
DCHECK(!EndsWith(variation_labels, separator, false));
DCHECK(!StartsWith(other_labels, separator, false));
« no previous file with comments | « chrome/common/logging_chrome.cc ('k') | chrome/common/metrics/variations/experiment_labels_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698