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

Side by Side Diff: chrome/browser/net/chrome_network_delegate.cc

Issue 1182183003: Move EndsWith to base namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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
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 "chrome/browser/net/chrome_network_delegate.h" 5 #include "chrome/browser/net/chrome_network_delegate.h"
6 6
7 #include <stdlib.h> 7 #include <stdlib.h>
8 8
9 #include <vector> 9 #include <vector>
10 10
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 const bool kCaseSensitive = true; 182 const bool kCaseSensitive = true;
183 183
184 std::string mime_type; 184 std::string mime_type;
185 request->GetMimeType(&mime_type); 185 request->GetMimeType(&mime_type);
186 186
187 for (size_t i = 0; i < arraysize(kEligibleMasks); i++) { 187 for (size_t i = 0; i < arraysize(kEligibleMasks); i++) {
188 const char *prefix = kEligibleMasks[i].prefix; 188 const char *prefix = kEligibleMasks[i].prefix;
189 const char *suffix = kEligibleMasks[i].suffix; 189 const char *suffix = kEligibleMasks[i].suffix;
190 if (prefix && !base::StartsWithASCII(mime_type, prefix, kCaseSensitive)) 190 if (prefix && !base::StartsWithASCII(mime_type, prefix, kCaseSensitive))
191 continue; 191 continue;
192 if (suffix && !EndsWith(mime_type, suffix, kCaseSensitive)) 192 if (suffix && !base::EndsWith(mime_type, suffix, kCaseSensitive))
193 continue; 193 continue;
194 return true; 194 return true;
195 } 195 }
196 return false; 196 return false;
197 } 197 }
198 198
199 // Returns whether |request| was issued by a renderer process, as opposed to 199 // Returns whether |request| was issued by a renderer process, as opposed to
200 // the browser process or a plugin process. 200 // the browser process or a plugin process.
201 bool IsRendererInitiatedRequest(const net::URLRequest* request) { 201 bool IsRendererInitiatedRequest(const net::URLRequest* request) {
202 const ResourceRequestInfo* info = ResourceRequestInfo::ForRequest(request); 202 const ResourceRequestInfo* info = ResourceRequestInfo::ForRequest(request);
(...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after
707 return experimental_web_platform_features_enabled_; 707 return experimental_web_platform_features_enabled_;
708 } 708 }
709 709
710 bool ChromeNetworkDelegate::OnCancelURLRequestWithPolicyViolatingReferrerHeader( 710 bool ChromeNetworkDelegate::OnCancelURLRequestWithPolicyViolatingReferrerHeader(
711 const net::URLRequest& request, 711 const net::URLRequest& request,
712 const GURL& target_url, 712 const GURL& target_url,
713 const GURL& referrer_url) const { 713 const GURL& referrer_url) const {
714 ReportInvalidReferrerSend(target_url, referrer_url); 714 ReportInvalidReferrerSend(target_url, referrer_url);
715 return true; 715 return true;
716 } 716 }
OLDNEW
« no previous file with comments | « chrome/browser/metrics/chromeos_metrics_provider.cc ('k') | chrome/browser/net/pref_proxy_config_tracker_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698