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/test_runner/web_test_proxy.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 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/test_runner/web_test_proxy.h" 5 #include "components/test_runner/web_test_proxy.h"
6 6
7 #include <cctype> 7 #include <cctype>
8 8
9 #include "base/callback_helpers.h" 9 #include "base/callback_helpers.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 192
193 void BlockRequest(blink::WebURLRequest& request) { 193 void BlockRequest(blink::WebURLRequest& request) {
194 request.setURL(GURL("255.255.255.255")); 194 request.setURL(GURL("255.255.255.255"));
195 } 195 }
196 196
197 bool IsLocalHost(const std::string& host) { 197 bool IsLocalHost(const std::string& host) {
198 return host == "127.0.0.1" || host == "localhost"; 198 return host == "127.0.0.1" || host == "localhost";
199 } 199 }
200 200
201 bool IsTestHost(const std::string& host) { 201 bool IsTestHost(const std::string& host) {
202 return EndsWith(host, ".test", false); 202 return base::EndsWith(host, ".test", false);
203 } 203 }
204 204
205 bool HostIsUsedBySomeTestsToGenerateError(const std::string& host) { 205 bool HostIsUsedBySomeTestsToGenerateError(const std::string& host) {
206 return host == "255.255.255.255"; 206 return host == "255.255.255.255";
207 } 207 }
208 208
209 // Used to write a platform neutral file:/// URL by only taking the filename 209 // Used to write a platform neutral file:/// URL by only taking the filename
210 // (e.g., converts "file:///tmp/foo.txt" to just "foo.txt"). 210 // (e.g., converts "file:///tmp/foo.txt" to just "foo.txt").
211 std::string URLSuitableForTestResult(const std::string& url) { 211 std::string URLSuitableForTestResult(const std::string& url) {
212 if (url.empty() || std::string::npos == url.find("file://")) 212 if (url.empty() || std::string::npos == url.find("file://"))
(...skipping 1183 matching lines...) Expand 10 before | Expand all | Expand 10 after
1396 // to cancel the input method's ongoing composition session. 1396 // to cancel the input method's ongoing composition session.
1397 if (web_widget_) 1397 if (web_widget_)
1398 web_widget_->confirmComposition(); 1398 web_widget_->confirmComposition();
1399 } 1399 }
1400 1400
1401 blink::WebString WebTestProxyBase::acceptLanguages() { 1401 blink::WebString WebTestProxyBase::acceptLanguages() {
1402 return blink::WebString::fromUTF8(accept_languages_); 1402 return blink::WebString::fromUTF8(accept_languages_);
1403 } 1403 }
1404 1404
1405 } // namespace test_runner 1405 } // namespace test_runner
OLDNEW
« no previous file with comments | « components/storage_monitor/volume_mount_watcher_win.cc ('k') | components/translate/core/browser/translate_language_list.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698