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

Side by Side Diff: content/renderer/fetchers/resource_fetcher_impl.cc

Issue 1858533002: Introduce WebCachePolicy to merge cache policy enums (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: hiroshige review Created 4 years, 8 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 "content/renderer/fetchers/resource_fetcher_impl.h" 5 #include "content/renderer/fetchers/resource_fetcher_impl.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/strings/string_util.h" 8 #include "base/strings/string_util.h"
9 #include "base/time/time.h" 9 #include "base/time/time.h"
10 #include "third_party/WebKit/public/platform/Platform.h" 10 #include "third_party/WebKit/public/platform/Platform.h"
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 } 69 }
70 } 70 }
71 71
72 void ResourceFetcherImpl::SetSkipServiceWorker(bool skip_service_worker) { 72 void ResourceFetcherImpl::SetSkipServiceWorker(bool skip_service_worker) {
73 DCHECK(!request_.isNull()); 73 DCHECK(!request_.isNull());
74 DCHECK(!loader_); 74 DCHECK(!loader_);
75 75
76 request_.setSkipServiceWorker(skip_service_worker); 76 request_.setSkipServiceWorker(skip_service_worker);
77 } 77 }
78 78
79 void ResourceFetcherImpl::SetCachePolicy( 79 void ResourceFetcherImpl::SetCachePolicy(blink::WebCachePolicy policy) {
80 blink::WebURLRequest::CachePolicy policy) {
81 DCHECK(!request_.isNull()); 80 DCHECK(!request_.isNull());
82 DCHECK(!loader_); 81 DCHECK(!loader_);
83 82
84 request_.setCachePolicy(policy); 83 request_.setCachePolicy(policy);
85 } 84 }
86 85
87 void ResourceFetcherImpl::SetLoaderOptions( 86 void ResourceFetcherImpl::SetLoaderOptions(
88 const blink::WebURLLoaderOptions& options) { 87 const blink::WebURLLoaderOptions& options) {
89 DCHECK(!request_.isNull()); 88 DCHECK(!request_.isNull());
90 DCHECK(!loader_); 89 DCHECK(!loader_);
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 callback.Run(status() == LOAD_FAILED ? blink::WebURLResponse() : response(), 143 callback.Run(status() == LOAD_FAILED ? blink::WebURLResponse() : response(),
145 status() == LOAD_FAILED ? std::string() : data()); 144 status() == LOAD_FAILED ? std::string() : data());
146 } 145 }
147 146
148 void ResourceFetcherImpl::Cancel() { 147 void ResourceFetcherImpl::Cancel() {
149 loader_->cancel(); 148 loader_->cancel();
150 WebURLLoaderClientImpl::Cancel(); 149 WebURLLoaderClientImpl::Cancel();
151 } 150 }
152 151
153 } // namespace content 152 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/fetchers/resource_fetcher_impl.h ('k') | content/renderer/history_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698