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

Side by Side Diff: components/signin/core/browser/signin_header_helper.cc

Issue 1765993002: Remove UnescapeRule::URL_SPECIAL_CHARS from components/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Response to comments Created 4 years, 9 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 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 "components/signin/core/browser/signin_header_helper.h" 5 #include "components/signin/core/browser/signin_header_helper.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 const std::string& header_value) { 71 const std::string& header_value) {
72 MirrorResponseHeaderDictionary dictionary; 72 MirrorResponseHeaderDictionary dictionary;
73 for (const base::StringPiece& field : 73 for (const base::StringPiece& field :
74 base::SplitStringPiece(header_value, ",", base::KEEP_WHITESPACE, 74 base::SplitStringPiece(header_value, ",", base::KEEP_WHITESPACE,
75 base::SPLIT_WANT_NONEMPTY)) { 75 base::SPLIT_WANT_NONEMPTY)) {
76 size_t delim = field.find_first_of('='); 76 size_t delim = field.find_first_of('=');
77 if (delim == std::string::npos) { 77 if (delim == std::string::npos) {
78 DLOG(WARNING) << "Unexpected GAIA header field '" << field << "'."; 78 DLOG(WARNING) << "Unexpected GAIA header field '" << field << "'.";
79 continue; 79 continue;
80 } 80 }
81 dictionary[field.substr(0, delim).as_string()] = 81 dictionary[field.substr(0, delim).as_string()] = net::UnescapeURLComponent(
82 net::UnescapeURLComponent(field.substr(delim + 1).as_string(), 82 field.substr(delim + 1).as_string(),
83 net::UnescapeRule::URL_SPECIAL_CHARS); 83 net::UnescapeRule::PATH_SEPARATORS |
84 net::UnescapeRule::URL_SPECIAL_CHARS_EXCEPT_PATH_SEPARATORS);
84 } 85 }
85 return dictionary; 86 return dictionary;
86 } 87 }
87 88
88 std::string BuildMirrorRequestIfPossible( 89 std::string BuildMirrorRequestIfPossible(
89 const char* pattern, 90 const char* pattern,
90 const GURL& url, 91 const GURL& url,
91 const std::string& account_id, 92 const std::string& account_id,
92 const content_settings::CookieSettings* cookie_settings, 93 const content_settings::CookieSettings* cookie_settings,
93 int profile_mode_mask) { 94 int profile_mode_mask) {
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 if (!request->response_headers()->GetNormalizedHeader( 218 if (!request->response_headers()->GetNormalizedHeader(
218 kChromeManageAccountsHeader, &header_value)) { 219 kChromeManageAccountsHeader, &header_value)) {
219 return empty_params; 220 return empty_params;
220 } 221 }
221 222
222 DCHECK(switches::IsEnableAccountConsistency() && !is_off_the_record); 223 DCHECK(switches::IsEnableAccountConsistency() && !is_off_the_record);
223 return BuildManageAccountsParams(header_value); 224 return BuildManageAccountsParams(header_value);
224 } 225 }
225 226
226 } // namespace signin 227 } // namespace signin
OLDNEW
« no previous file with comments | « components/policy/core/common/cloud/device_management_service_unittest.cc ('k') | components/url_formatter/url_fixer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698