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

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

Issue 2714423002: Rename SkipServiceWorker to ServiceWorkerMode (Closed)
Patch Set: typos-- Created 3 years, 9 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/multi_resolution_image_resource_fetcher.h" 5 #include "content/renderer/fetchers/multi_resolution_image_resource_fetcher.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "content/child/image_decoder.h" 9 #include "content/child/image_decoder.h"
10 #include "content/public/renderer/associated_resource_fetcher.h" 10 #include "content/public/renderer/associated_resource_fetcher.h"
(...skipping 26 matching lines...) Expand all
37 WebAssociatedURLLoaderOptions options; 37 WebAssociatedURLLoaderOptions options;
38 options.allowCredentials = true; 38 options.allowCredentials = true;
39 options.crossOriginRequestPolicy = 39 options.crossOriginRequestPolicy =
40 WebAssociatedURLLoaderOptions::CrossOriginRequestPolicyAllow; 40 WebAssociatedURLLoaderOptions::CrossOriginRequestPolicyAllow;
41 fetcher_->SetLoaderOptions(options); 41 fetcher_->SetLoaderOptions(options);
42 42
43 // To prevent cache tainting, the favicon requests have to by-pass the service 43 // To prevent cache tainting, the favicon requests have to by-pass the service
44 // workers. This should ideally not happen or at least not all the time. 44 // workers. This should ideally not happen or at least not all the time.
45 // See https://crbug.com/448427 45 // See https://crbug.com/448427
46 if (request_context == WebURLRequest::RequestContextFavicon) 46 if (request_context == WebURLRequest::RequestContextFavicon)
47 fetcher_->SetSkipServiceWorker(WebURLRequest::SkipServiceWorker::All); 47 fetcher_->SetServiceWorkerMode(WebURLRequest::ServiceWorkerMode::None);
48 48
49 fetcher_->SetCachePolicy(cache_policy); 49 fetcher_->SetCachePolicy(cache_policy);
50 50
51 fetcher_->Start( 51 fetcher_->Start(
52 frame, 52 frame,
53 request_context, 53 request_context,
54 WebURLRequest::FrameTypeNone, 54 WebURLRequest::FrameTypeNone,
55 base::Bind(&MultiResolutionImageResourceFetcher::OnURLFetchComplete, 55 base::Bind(&MultiResolutionImageResourceFetcher::OnURLFetchComplete,
56 base::Unretained(this))); 56 base::Unretained(this)));
57 } 57 }
(...skipping 24 matching lines...) Expand all
82 } 82 }
83 83
84 void MultiResolutionImageResourceFetcher::OnRenderFrameDestruct() { 84 void MultiResolutionImageResourceFetcher::OnRenderFrameDestruct() {
85 // Take a reference to the callback as running the callback may lead to our 85 // Take a reference to the callback as running the callback may lead to our
86 // destruction. 86 // destruction.
87 Callback callback = callback_; 87 Callback callback = callback_;
88 callback.Run(this, std::vector<SkBitmap>()); 88 callback.Run(this, std::vector<SkBitmap>());
89 } 89 }
90 90
91 } // namespace content 91 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/fetchers/associated_resource_fetcher_impl.cc ('k') | content/renderer/pepper/pepper_url_loader_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698