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

Side by Side Diff: components/image_fetcher/image_fetcher.h

Issue 2756633003: [Image Fetcher] Add support to disable cookies (Closed)
Patch Set: 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 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 #ifndef COMPONENTS_IMAGE_FETCHER_IMAGE_FETCHER_H_ 5 #ifndef COMPONENTS_IMAGE_FETCHER_IMAGE_FETCHER_H_
6 #define COMPONENTS_IMAGE_FETCHER_IMAGE_FETCHER_H_ 6 #define COMPONENTS_IMAGE_FETCHER_IMAGE_FETCHER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 27 matching lines...) Expand all
38 DataUseServiceName data_use_service_name) = 0; 38 DataUseServiceName data_use_service_name) = 0;
39 39
40 // Sets the desired size for images with multiple frames (like .ico files). 40 // Sets the desired size for images with multiple frames (like .ico files).
41 // By default, the image fetcher choses smaller images. Override to choose a 41 // By default, the image fetcher choses smaller images. Override to choose a
42 // frame with a size as close as possible to |size| (trying to take one in 42 // frame with a size as close as possible to |size| (trying to take one in
43 // larger size if there's no precise match). Passing gfx::Size() as 43 // larger size if there's no precise match). Passing gfx::Size() as
44 // |size| is also supported and will result in chosing the smallest available 44 // |size| is also supported and will result in chosing the smallest available
45 // size. 45 // size.
46 virtual void SetDesiredImageFrameSize(const gfx::Size& size) = 0; 46 virtual void SetDesiredImageFrameSize(const gfx::Size& size) = 0;
47 47
48 // Disables sending cookies together with the HTTP request.
49 virtual void DisableCookies() = 0;
50
48 // An empty gfx::Image will be returned to the callback in case the image 51 // An empty gfx::Image will be returned to the callback in case the image
49 // could not be fetched. 52 // could not be fetched.
50 virtual void StartOrQueueNetworkRequest( 53 virtual void StartOrQueueNetworkRequest(
51 const std::string& id, 54 const std::string& id,
52 const GURL& image_url, 55 const GURL& image_url,
53 base::Callback<void(const std::string&, const gfx::Image&)> callback) = 0; 56 base::Callback<void(const std::string&, const gfx::Image&)> callback) = 0;
54 57
55 virtual ImageDecoder* GetImageDecoder() = 0; 58 virtual ImageDecoder* GetImageDecoder() = 0;
56 59
57 private: 60 private:
58 DISALLOW_COPY_AND_ASSIGN(ImageFetcher); 61 DISALLOW_COPY_AND_ASSIGN(ImageFetcher);
59 }; 62 };
60 63
61 } // namespace image_fetcher 64 } // namespace image_fetcher
62 65
63 #endif // COMPONENTS_IMAGE_FETCHER_IMAGE_FETCHER_H_ 66 #endif // COMPONENTS_IMAGE_FETCHER_IMAGE_FETCHER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698