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

Side by Side Diff: google_apis/gcm/engine/gservices_settings.cc

Issue 1282363003: Convert remaining StringToLowerASCII to ToLowerASCII (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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 unified diff | Download patch
« no previous file with comments | « google_apis/gaia/gaia_auth_util.cc ('k') | ios/chrome/browser/chrome_url_util.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "google_apis/gcm/engine/gservices_settings.h" 5 #include "google_apis/gcm/engine/gservices_settings.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/sha1.h" 9 #include "base/sha1.h"
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 ++iter) { 191 ++iter) {
192 data += iter->first; 192 data += iter->first;
193 data += '\0'; 193 data += '\0';
194 data += iter->second; 194 data += iter->second;
195 data += '\0'; 195 data += '\0';
196 } 196 }
197 base::SHA1HashBytes( 197 base::SHA1HashBytes(
198 reinterpret_cast<const unsigned char*>(&data[0]), data.size(), hash); 198 reinterpret_cast<const unsigned char*>(&data[0]), data.size(), hash);
199 std::string digest = 199 std::string digest =
200 kDigestVersionPrefix + base::HexEncode(hash, base::kSHA1Length); 200 kDigestVersionPrefix + base::HexEncode(hash, base::kSHA1Length);
201 digest = base::StringToLowerASCII(digest); 201 digest = base::ToLowerASCII(digest);
202 return digest; 202 return digest;
203 } 203 }
204 204
205 GServicesSettings::GServicesSettings() : weak_ptr_factory_(this) { 205 GServicesSettings::GServicesSettings() : weak_ptr_factory_(this) {
206 digest_ = CalculateDigest(settings_); 206 digest_ = CalculateDigest(settings_);
207 } 207 }
208 208
209 GServicesSettings::~GServicesSettings() { 209 GServicesSettings::~GServicesSettings() {
210 } 210 }
211 211
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 if (!command_line->HasSwitch(switches::kGCMRegistrationURL)) 341 if (!command_line->HasSwitch(switches::kGCMRegistrationURL))
342 return GURL(kDefaultRegistrationURL); 342 return GURL(kDefaultRegistrationURL);
343 343
344 return GURL( 344 return GURL(
345 command_line->GetSwitchValueASCII(switches::kGCMRegistrationURL)); 345 command_line->GetSwitchValueASCII(switches::kGCMRegistrationURL));
346 } 346 }
347 return GURL(iter->second); 347 return GURL(iter->second);
348 } 348 }
349 349
350 } // namespace gcm 350 } // namespace gcm
OLDNEW
« no previous file with comments | « google_apis/gaia/gaia_auth_util.cc ('k') | ios/chrome/browser/chrome_url_util.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698