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

Side by Side Diff: net/cookies/cookie_constants.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 | « net/cert/x509_certificate.cc ('k') | net/cookies/parsed_cookie.cc » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "net/cookies/cookie_constants.h" 5 #include "net/cookies/cookie_constants.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/strings/string_util.h" 8 #include "base/strings/string_util.h"
9 9
10 namespace net { 10 namespace net {
(...skipping 12 matching lines...) Expand all
23 return kPriorityMedium; 23 return kPriorityMedium;
24 case COOKIE_PRIORITY_LOW: 24 case COOKIE_PRIORITY_LOW:
25 return kPriorityLow; 25 return kPriorityLow;
26 default: 26 default:
27 NOTREACHED(); 27 NOTREACHED();
28 } 28 }
29 return std::string(); 29 return std::string();
30 } 30 }
31 31
32 NET_EXPORT CookiePriority StringToCookiePriority(const std::string& priority) { 32 NET_EXPORT CookiePriority StringToCookiePriority(const std::string& priority) {
33 std::string priority_comp(priority); 33 std::string priority_comp = base::ToLowerASCII(priority);
34 base::StringToLowerASCII(&priority_comp);
35 34
36 if (priority_comp == kPriorityHigh) 35 if (priority_comp == kPriorityHigh)
37 return COOKIE_PRIORITY_HIGH; 36 return COOKIE_PRIORITY_HIGH;
38 if (priority_comp == kPriorityMedium) 37 if (priority_comp == kPriorityMedium)
39 return COOKIE_PRIORITY_MEDIUM; 38 return COOKIE_PRIORITY_MEDIUM;
40 if (priority_comp == kPriorityLow) 39 if (priority_comp == kPriorityLow)
41 return COOKIE_PRIORITY_LOW; 40 return COOKIE_PRIORITY_LOW;
42 41
43 return COOKIE_PRIORITY_DEFAULT; 42 return COOKIE_PRIORITY_DEFAULT;
44 } 43 }
45 44
46 } // namespace net 45 } // namespace net
OLDNEW
« no previous file with comments | « net/cert/x509_certificate.cc ('k') | net/cookies/parsed_cookie.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698