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

Unified Diff: chrome/browser/extensions/api/feedback_private/blob_reader.h

Issue 17111003: Implement the feedbackPrivate API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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
Index: chrome/browser/extensions/api/feedback_private/blob_reader.h
diff --git a/chrome/browser/extensions/api/feedback_private/blob_reader.h b/chrome/browser/extensions/api/feedback_private/blob_reader.h
new file mode 100644
index 0000000000000000000000000000000000000000..6c85452eae09959ca9138c3c0475ff1a710e68f0
--- /dev/null
+++ b/chrome/browser/extensions/api/feedback_private/blob_reader.h
@@ -0,0 +1,44 @@
+// Copyright (c) 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_EXTENSIONS_API_FEEDBACK_PRIVATE_BLOB_READER_H_
+#define CHROME_BROWSER_EXTENSIONS_API_FEEDBACK_PRIVATE_BLOB_READER_H_
+
+#include <string>
+
+#include "base/callback.h"
+#include "base/memory/scoped_ptr.h"
+#include "googleurl/src/gurl.h"
+#include "net/base/io_buffer.h"
+#include "net/url_request/url_fetcher_delegate.h"
+#include "net/url_request/url_request.h"
+
+class Profile;
+namespace net {
+class URLFetcher;
+}
+
+class BlobReader : public net::URLFetcherDelegate {
+ public:
+ typedef base::Callback<void(scoped_ptr<std::string> blob_data)>
+ BlobReadCallback;
+
+ BlobReader(Profile* profile,
+ const GURL& blob_url,
+ BlobReadCallback callback);
+ virtual ~BlobReader();
+
+ void Start();
+
+ private:
+ // Overridden from net::URLFetcherDelegate.
+ virtual void OnURLFetchComplete(const net::URLFetcher* source) OVERRIDE;
+
+ BlobReadCallback callback_;
+ net::URLFetcher* fetcher_;
+
+ DISALLOW_COPY_AND_ASSIGN(BlobReader);
+};
+
+#endif // CHROME_BROWSER_EXTENSIONS_API_FEEDBACK_PRIVATE_BLOB_READER_H_

Powered by Google App Engine
This is Rietveld 408576698