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

Side by Side Diff: chrome/browser/safe_browsing/safe_browsing_service_browsertest.cc

Issue 1172183002: Move StartsWith[ASCII] to base namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@string_util3
Patch Set: merger 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 // This test creates a safebrowsing service using test safebrowsing database 5 // This test creates a safebrowsing service using test safebrowsing database
6 // and a test protocol manager. It is used to test logics in safebrowsing 6 // and a test protocol manager. It is used to test logics in safebrowsing
7 // service. 7 // service.
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 1285 matching lines...) Expand 10 before | Expand all | Expand 10 after
1296 void ForceUpdate() { 1296 void ForceUpdate() {
1297 sb_service_->protocol_manager()->ForceScheduleNextUpdate( 1297 sb_service_->protocol_manager()->ForceScheduleNextUpdate(
1298 base::TimeDelta::FromSeconds(0)); 1298 base::TimeDelta::FromSeconds(0));
1299 } 1299 }
1300 1300
1301 scoped_refptr<SafeBrowsingService> sb_service_; 1301 scoped_refptr<SafeBrowsingService> sb_service_;
1302 1302
1303 private: 1303 private:
1304 static scoped_ptr<net::test_server::HttpResponse> HandleRequest( 1304 static scoped_ptr<net::test_server::HttpResponse> HandleRequest(
1305 const net::test_server::HttpRequest& request) { 1305 const net::test_server::HttpRequest& request) {
1306 if (!StartsWithASCII(request.relative_url, "/testpath/", true)) { 1306 if (!base::StartsWithASCII(request.relative_url, "/testpath/", true)) {
1307 ADD_FAILURE() << "bad path"; 1307 ADD_FAILURE() << "bad path";
1308 return nullptr; 1308 return nullptr;
1309 } 1309 }
1310 1310
1311 auto cookie_it = request.headers.find("Cookie"); 1311 auto cookie_it = request.headers.find("Cookie");
1312 if (cookie_it == request.headers.end()) { 1312 if (cookie_it == request.headers.end()) {
1313 ADD_FAILURE() << "no cookie header"; 1313 ADD_FAILURE() << "no cookie header";
1314 return nullptr; 1314 return nullptr;
1315 } 1315 }
1316 1316
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
1349 content::WindowedNotificationObserver observer( 1349 content::WindowedNotificationObserver observer(
1350 chrome::NOTIFICATION_SAFE_BROWSING_UPDATE_COMPLETE, 1350 chrome::NOTIFICATION_SAFE_BROWSING_UPDATE_COMPLETE,
1351 content::Source<SafeBrowsingDatabaseManager>( 1351 content::Source<SafeBrowsingDatabaseManager>(
1352 sb_service_->database_manager().get())); 1352 sb_service_->database_manager().get()));
1353 BrowserThread::PostTask( 1353 BrowserThread::PostTask(
1354 BrowserThread::IO, 1354 BrowserThread::IO,
1355 FROM_HERE, 1355 FROM_HERE,
1356 base::Bind(&SafeBrowsingDatabaseManagerCookieTest::ForceUpdate, this)); 1356 base::Bind(&SafeBrowsingDatabaseManagerCookieTest::ForceUpdate, this));
1357 observer.Wait(); 1357 observer.Wait();
1358 } 1358 }
OLDNEW
« no previous file with comments | « chrome/browser/safe_browsing/protocol_manager.cc ('k') | chrome/browser/search/local_ntp_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698