1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_EXTENSIONS_API_FEEDBACK_PRIVATE_BLOB_READER_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_FEEDBACK_PRIVATE_BLOB_READER_H_
10 #include "base/callback.h"
11 #include "base/memory/scoped_ptr.h"
12 #include "net/base/io_buffer.h"
13 #include "net/url_request/url_fetcher_delegate.h"
14 #include "net/url_request/url_request.h"
22 class BlobReader : public net::URLFetcherDelegate {
24 typedef base::Callback<void(scoped_ptr<std::string> blob_data)>
27 BlobReader(Profile* profile,
28 const std::string& blob_uuid,
29 BlobReadCallback callback);
30 virtual ~BlobReader();
35 // Overridden from net::URLFetcherDelegate.
36 virtual void OnURLFetchComplete(const net::URLFetcher* source) OVERRIDE;
38 BlobReadCallback callback_;
39 scoped_ptr<net::URLFetcher> fetcher_;
41 DISALLOW_COPY_AND_ASSIGN(BlobReader);
44 #endif // CHROME_BROWSER_EXTENSIONS_API_FEEDBACK_PRIVATE_BLOB_READER_H_