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

Side by Side Diff: content/browser/loader/async_revalidation_manager_unittest.cc

Issue 2481923002: [WIP] make GURL::path() return a StringPiece (Closed)
Patch Set: thanks asan Created 4 years, 1 month 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "content/browser/loader/async_revalidation_manager.h" 5 #include "content/browser/loader/async_revalidation_manager.h"
6 6
7 #include <deque> 7 #include <deque>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 // breaks and end in "\n\n". 124 // breaks and end in "\n\n".
125 void SetResponse(const std::string& headers, const std::string& data) { 125 void SetResponse(const std::string& headers, const std::string& data) {
126 response_headers_ = headers; 126 response_headers_ = headers;
127 response_data_ = data; 127 response_data_ = data;
128 } 128 }
129 129
130 net::URLRequestJob* MaybeCreateJobWithProtocolHandler( 130 net::URLRequestJob* MaybeCreateJobWithProtocolHandler(
131 const std::string& scheme, 131 const std::string& scheme,
132 net::URLRequest* request, 132 net::URLRequest* request,
133 net::NetworkDelegate* network_delegate) const override { 133 net::NetworkDelegate* network_delegate) const override {
134 std::string path = request->url().path(); 134 base::StringPiece path = request->url().path();
135 if (base::StartsWith(path, "/async-revalidate", 135 if (base::StartsWith(path, "/async-revalidate",
136 base::CompareCase::SENSITIVE)) { 136 base::CompareCase::SENSITIVE)) {
137 return new AsyncRevalidationRequiredURLRequestTestJob(request, 137 return new AsyncRevalidationRequiredURLRequestTestJob(request,
138 network_delegate); 138 network_delegate);
139 } 139 }
140 if (base::StartsWith(path, "/redirect", base::CompareCase::SENSITIVE)) { 140 if (base::StartsWith(path, "/redirect", base::CompareCase::SENSITIVE)) {
141 return new RedirectAndRevalidateURLRequestTestJob(request, 141 return new RedirectAndRevalidateURLRequestTestJob(request,
142 network_delegate); 142 network_delegate);
143 } 143 }
144 return new URLRequestTestDelayedCompletionJob( 144 return new URLRequestTestDelayedCompletionJob(
(...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after
549 // already completed. 549 // already completed.
550 EXPECT_TRUE(NextRequestWasDestroyed()); 550 EXPECT_TRUE(NextRequestWasDestroyed());
551 551
552 // But no others. 552 // But no others.
553 EXPECT_TRUE(IsEmpty()); 553 EXPECT_TRUE(IsEmpty());
554 } 554 }
555 555
556 } // namespace 556 } // namespace
557 557
558 } // namespace content 558 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/find_request_manager_browsertest.cc ('k') | content/browser/media/android/media_resource_getter_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698