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

Side by Side Diff: components/content_settings/core/common/content_settings_pattern.cc

Issue 1279123004: Replace ToLower calls to the new format (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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "components/content_settings/core/common/content_settings_pattern.h" 5 #include "components/content_settings/core/common/content_settings_pattern.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/strings/string_split.h" 10 #include "base/strings/string_split.h"
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 ContentSettingsPattern(parts, true)) { 204 ContentSettingsPattern(parts, true)) {
205 return ContentSettingsPattern(); 205 return ContentSettingsPattern();
206 } 206 }
207 207
208 return ContentSettingsPattern(parts_, is_valid_); 208 return ContentSettingsPattern(parts_, is_valid_);
209 } 209 }
210 210
211 // static 211 // static
212 bool ContentSettingsPattern::Builder::Canonicalize(PatternParts* parts) { 212 bool ContentSettingsPattern::Builder::Canonicalize(PatternParts* parts) {
213 // Canonicalize the scheme part. 213 // Canonicalize the scheme part.
214 const std::string scheme(base::StringToLowerASCII(parts->scheme)); 214 const std::string scheme(base::ToLowerASCII(parts->scheme));
215 parts->scheme = scheme; 215 parts->scheme = scheme;
216 216
217 if (parts->scheme == std::string(url::kFileScheme) && 217 if (parts->scheme == std::string(url::kFileScheme) &&
218 !parts->is_path_wildcard) { 218 !parts->is_path_wildcard) {
219 GURL url(std::string(url::kFileScheme) + 219 GURL url(std::string(url::kFileScheme) +
220 std::string(url::kStandardSchemeSeparator) + parts->path); 220 std::string(url::kStandardSchemeSeparator) + parts->path);
221 parts->path = url.path(); 221 parts->path = url.path();
222 } 222 }
223 223
224 // Canonicalize the host part. 224 // Canonicalize the host part.
(...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after
701 if (!parts.is_port_wildcard && other_parts.is_port_wildcard) 701 if (!parts.is_port_wildcard && other_parts.is_port_wildcard)
702 return ContentSettingsPattern::PREDECESSOR; 702 return ContentSettingsPattern::PREDECESSOR;
703 703
704 int result = parts.port.compare(other_parts.port); 704 int result = parts.port.compare(other_parts.port);
705 if (result == 0) 705 if (result == 0)
706 return ContentSettingsPattern::IDENTITY; 706 return ContentSettingsPattern::IDENTITY;
707 if (result > 0) 707 if (result > 0)
708 return ContentSettingsPattern::DISJOINT_ORDER_PRE; 708 return ContentSettingsPattern::DISJOINT_ORDER_PRE;
709 return ContentSettingsPattern::DISJOINT_ORDER_POST; 709 return ContentSettingsPattern::DISJOINT_ORDER_POST;
710 } 710 }
OLDNEW
« no previous file with comments | « components/autofill/core/common/save_password_progress_logger.cc ('k') | components/crx_file/crx_file.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698