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

Side by Side Diff: components/google/core/browser/google_util.cc

Issue 808253006: Remove the GoogleURLTracker infobar functionality entirely. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix size_t -> int conversion (since I turned off the warning disable for it) Created 6 years 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/google/core/browser/google_util.h" 5 #include "components/google/core/browser/google_util.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 } 72 }
73 73
74 } // namespace 74 } // namespace
75 75
76 76
77 namespace google_util { 77 namespace google_util {
78 78
79 // Global functions ----------------------------------------------------------- 79 // Global functions -----------------------------------------------------------
80 80
81 bool HasGoogleSearchQueryParam(const std::string& str) { 81 bool HasGoogleSearchQueryParam(const std::string& str) {
82 url::Component query(0, str.length()), key, value; 82 url::Component query(0, static_cast<int>(str.length())), key, value;
Ilya Sherman 2015/01/06 00:39:58 nit: Would checked_cast be better?
Peter Kasting 2015/01/06 00:54:26 I don't think it's necessary. This just makes exp
83 while (url::ExtractQueryKeyValue(str.c_str(), &query, &key, &value)) { 83 while (url::ExtractQueryKeyValue(str.c_str(), &query, &key, &value)) {
84 if ((key.len == 1) && (str[key.begin] == 'q') && value.is_nonempty()) 84 if ((key.len == 1) && (str[key.begin] == 'q') && value.is_nonempty())
85 return true; 85 return true;
86 } 86 }
87 return false; 87 return false;
88 } 88 }
89 89
90 GURL LinkDoctorBaseURL() { 90 GURL LinkDoctorBaseURL() {
91 if (gUseMockLinkDoctorBaseURLForTesting) 91 if (gUseMockLinkDoctorBaseURLForTesting)
92 return GURL("http://mock.linkdoctor.url/for?testing"); 92 return GURL("http://mock.linkdoctor.url/for?testing");
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 } 208 }
209 209
210 bool IsYoutubeDomainUrl(const GURL& url, 210 bool IsYoutubeDomainUrl(const GURL& url,
211 SubdomainPermission subdomain_permission, 211 SubdomainPermission subdomain_permission,
212 PortPermission port_permission) { 212 PortPermission port_permission) {
213 return IsValidURL(url, port_permission) && 213 return IsValidURL(url, port_permission) &&
214 IsValidHostName(url.host(), "youtube", subdomain_permission); 214 IsValidHostName(url.host(), "youtube", subdomain_permission);
215 } 215 }
216 216
217 } // namespace google_util 217 } // namespace google_util
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698