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

Side by Side Diff: net/proxy/proxy_script_fetcher_impl.cc

Issue 1172753003: Move LowerCaseEqualsASCII to base namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@string_util
Patch Set: Created 5 years, 6 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/proxy/proxy_bypass_rules.cc ('k') | net/proxy/proxy_server.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 (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 "net/proxy/proxy_script_fetcher_impl.h" 5 #include "net/proxy/proxy_script_fetcher_impl.h"
6 6
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 22 matching lines...) Expand all
33 // Responses exceeding this will fail with ERR_TIMED_OUT. 33 // Responses exceeding this will fail with ERR_TIMED_OUT.
34 const int kDefaultMaxDurationMs = 300000; // 5 minutes 34 const int kDefaultMaxDurationMs = 300000; // 5 minutes
35 35
36 // Returns true if |mime_type| is one of the known PAC mime type. 36 // Returns true if |mime_type| is one of the known PAC mime type.
37 bool IsPacMimeType(const std::string& mime_type) { 37 bool IsPacMimeType(const std::string& mime_type) {
38 static const char * const kSupportedPacMimeTypes[] = { 38 static const char * const kSupportedPacMimeTypes[] = {
39 "application/x-ns-proxy-autoconfig", 39 "application/x-ns-proxy-autoconfig",
40 "application/x-javascript-config", 40 "application/x-javascript-config",
41 }; 41 };
42 for (size_t i = 0; i < arraysize(kSupportedPacMimeTypes); ++i) { 42 for (size_t i = 0; i < arraysize(kSupportedPacMimeTypes); ++i) {
43 if (LowerCaseEqualsASCII(mime_type, kSupportedPacMimeTypes[i])) 43 if (base::LowerCaseEqualsASCII(mime_type, kSupportedPacMimeTypes[i]))
44 return true; 44 return true;
45 } 45 }
46 return false; 46 return false;
47 } 47 }
48 48
49 // Converts |bytes| (which is encoded by |charset|) to UTF16, saving the resul 49 // Converts |bytes| (which is encoded by |charset|) to UTF16, saving the resul
50 // to |*utf16|. 50 // to |*utf16|.
51 // If |charset| is empty, then we don't know what it was and guess. 51 // If |charset| is empty, then we don't know what it was and guess.
52 void ConvertResponseToUTF16(const std::string& charset, 52 void ConvertResponseToUTF16(const std::string& charset,
53 const std::string& bytes, 53 const std::string& bytes,
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 // is still applicable. 312 // is still applicable.
313 if (cur_request_id_ != id) 313 if (cur_request_id_ != id)
314 return; 314 return;
315 315
316 DCHECK(cur_request_.get()); 316 DCHECK(cur_request_.get());
317 result_code_ = ERR_TIMED_OUT; 317 result_code_ = ERR_TIMED_OUT;
318 cur_request_->Cancel(); 318 cur_request_->Cancel();
319 } 319 }
320 320
321 } // namespace net 321 } // namespace net
OLDNEW
« no previous file with comments | « net/proxy/proxy_bypass_rules.cc ('k') | net/proxy/proxy_server.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698