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

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

Issue 2794343002: Network traffic annotation added to image_data_fetcher. (Closed)
Patch Set: Comments addressed. Created 3 years, 7 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_CORE_IMAGE_FETCHER_H_ 5 #ifndef COMPONENTS_IMAGE_FETCHER_CORE_IMAGE_FETCHER_H_
6 #define COMPONENTS_IMAGE_FETCHER_CORE_IMAGE_FETCHER_H_ 6 #define COMPONENTS_IMAGE_FETCHER_CORE_IMAGE_FETCHER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "base/optional.h" 12 #include "base/optional.h"
13 #include "components/data_use_measurement/core/data_use_user_data.h" 13 #include "components/data_use_measurement/core/data_use_user_data.h"
14 #include "components/image_fetcher/core/image_fetcher_delegate.h" 14 #include "components/image_fetcher/core/image_fetcher_delegate.h"
15 #include "net/traffic_annotation/network_traffic_annotation.h"
15 #include "url/gurl.h" 16 #include "url/gurl.h"
16 17
17 namespace gfx { 18 namespace gfx {
18 class Image; 19 class Image;
19 class Size; 20 class Size;
20 } 21 }
21 22
22 namespace image_fetcher { 23 namespace image_fetcher {
23 24
24 class ImageDecoder; 25 class ImageDecoder;
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 // larger size if there's no precise match). Passing gfx::Size() as 58 // larger size if there's no precise match). Passing gfx::Size() as
58 // |size| is also supported and will result in chosing the smallest available 59 // |size| is also supported and will result in chosing the smallest available
59 // size. 60 // size.
60 virtual void SetDesiredImageFrameSize(const gfx::Size& size) = 0; 61 virtual void SetDesiredImageFrameSize(const gfx::Size& size) = 0;
61 62
62 // An empty gfx::Image will be returned to the callback in case the image 63 // An empty gfx::Image will be returned to the callback in case the image
63 // could not be fetched. 64 // could not be fetched.
64 virtual void StartOrQueueNetworkRequest( 65 virtual void StartOrQueueNetworkRequest(
65 const std::string& id, 66 const std::string& id,
66 const GURL& image_url, 67 const GURL& image_url,
67 const ImageFetcherCallback& callback) = 0; 68 const ImageFetcherCallback& callback,
69 const net::NetworkTrafficAnnotationTag& traffic_annotation) = 0;
68 70
69 virtual ImageDecoder* GetImageDecoder() = 0; 71 virtual ImageDecoder* GetImageDecoder() = 0;
70 72
71 private: 73 private:
72 DISALLOW_COPY_AND_ASSIGN(ImageFetcher); 74 DISALLOW_COPY_AND_ASSIGN(ImageFetcher);
73 }; 75 };
74 76
75 } // namespace image_fetcher 77 } // namespace image_fetcher
76 78
77 #endif // COMPONENTS_IMAGE_FETCHER_CORE_IMAGE_FETCHER_H_ 79 #endif // COMPONENTS_IMAGE_FETCHER_CORE_IMAGE_FETCHER_H_
OLDNEW
« no previous file with comments | « components/image_fetcher/core/image_data_fetcher_unittest.cc ('k') | components/image_fetcher/core/image_fetcher_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698