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

Unified Diff: chrome/browser/bitmap_fetcher.h

Issue 319623003: [AiS] ImageService (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix signed/unsigned conflict. Created 6 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/android/banners/app_banner_manager.cc ('k') | chrome/browser/bitmap_fetcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/bitmap_fetcher.h
diff --git a/chrome/browser/bitmap_fetcher.h b/chrome/browser/bitmap_fetcher.h
index e53108475373ac0daab4fc8e883567856c577c6c..ae271fecf7bc74f051c511133d2730d41156cb15 100644
--- a/chrome/browser/bitmap_fetcher.h
+++ b/chrome/browser/bitmap_fetcher.h
@@ -2,81 +2,4 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_BITMAP_FETCHER_H_
-#define CHROME_BROWSER_BITMAP_FETCHER_H_
-
-#include "base/memory/scoped_ptr.h"
-#include "chrome/browser/bitmap_fetcher_delegate.h"
-#include "chrome/browser/image_decoder.h"
-#include "net/url_request/url_fetcher_delegate.h"
-#include "net/url_request/url_request.h"
-#include "third_party/skia/include/core/SkBitmap.h"
-#include "url/gurl.h"
-
-namespace net {
-class URLFetcher;
-class URLRequestContextGetter;
-} // namespace net
-
-namespace chrome {
-
-// Asynchrounously fetches an image from the given URL and returns the
-// decoded Bitmap to the provided BitmapFetcherDelegate.
-class BitmapFetcher : public net::URLFetcherDelegate,
- public ImageDecoder::Delegate {
- public:
- BitmapFetcher(const GURL& url, BitmapFetcherDelegate* delegate);
- virtual ~BitmapFetcher();
-
- const GURL& url() const { return url_; }
-
- // Start fetching the URL with the fetcher. The delegate is notified
- // asynchronously when done. Start may be called more than once in some
- // cases. If so, subsequent starts will be ignored since the operation is
- // already in progress. Arguments are used to configure the internal fetcher.
- // Values for |load_flags| are defined in net/base/load_flags.h. In general,
- // |net::LOAD_NORMAL| is appropriate.
- void Start(net::URLRequestContextGetter* request_context,
- const std::string& referrer,
- net::URLRequest::ReferrerPolicy referrer_policy,
- int load_flags);
-
- // Methods inherited from URLFetcherDelegate
-
- // This will be called when the URL has been fetched, successfully or not.
- // Use accessor methods on |source| to get the results.
- virtual void OnURLFetchComplete(const net::URLFetcher* source) OVERRIDE;
-
- // This will be called when some part of the response is read. |current|
- // denotes the number of bytes received up to the call, and |total| is the
- // expected total size of the response (or -1 if not determined).
- virtual void OnURLFetchDownloadProgress(const net::URLFetcher* source,
- int64 current,
- int64 total) OVERRIDE;
-
- // Methods inherited from ImageDecoder::Delegate
-
- // Called when image is decoded. |decoder| is used to identify the image in
- // case of decoding several images simultaneously. This will not be called
- // on the UI thread.
- virtual void OnImageDecoded(const ImageDecoder* decoder,
- const SkBitmap& decoded_image) OVERRIDE;
-
- // Called when decoding image failed.
- virtual void OnDecodeImageFailed(const ImageDecoder* decoder) OVERRIDE;
-
- private:
- // Alerts the delegate that a failure occurred.
- void ReportFailure();
-
- scoped_ptr<net::URLFetcher> url_fetcher_;
- scoped_refptr<ImageDecoder> image_decoder_;
- const GURL url_;
- BitmapFetcherDelegate* const delegate_;
-
- DISALLOW_COPY_AND_ASSIGN(BitmapFetcher);
-};
-
-} // namespace chrome
-
-#endif // CHROME_BROWSER_BITMAP_FETCHER_H_
+#include "chrome/browser/bitmap_fetcher/bitmap_fetcher.h"
tfarina 2014/12/10 17:46:36 Weird that rietveld marked this file as Deleted. B
« no previous file with comments | « chrome/browser/android/banners/app_banner_manager.cc ('k') | chrome/browser/bitmap_fetcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698