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

Unified Diff: chrome/browser/extensions/file_reader.h

Issue 8343008: base::Bind conversion for chrome/browser/extensions/file_reader. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 2 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/extensions/execute_code_in_tab_function.cc ('k') | chrome/browser/extensions/file_reader.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/file_reader.h
diff --git a/chrome/browser/extensions/file_reader.h b/chrome/browser/extensions/file_reader.h
index 4651260e7b3ed6edad7b06664463bf9e4f0e0fd6..63f2afa0f2333384f821cc6a63c15b05864aa67d 100644
--- a/chrome/browser/extensions/file_reader.h
+++ b/chrome/browser/extensions/file_reader.h
@@ -8,7 +8,7 @@
#include <string>
-#include "base/callback_old.h"
+#include "base/callback.h"
#include "base/memory/ref_counted.h"
#include "chrome/common/extensions/extension_resource.h"
@@ -21,9 +21,9 @@ class MessageLoop;
class FileReader : public base::RefCountedThreadSafe<FileReader> {
public:
// Reports success or failure and the data of the file upon success.
- typedef Callback2<bool, const std::string&>::Type Callback;
+ typedef base::Callback<void(bool, const std::string&)> Callback;
- FileReader(const ExtensionResource& resource, Callback* callback);
+ FileReader(const ExtensionResource& resource, const Callback& callback);
// Called to start reading the file on a background thread. Upon completion,
// the callback will be notified of the results.
@@ -35,10 +35,9 @@ class FileReader : public base::RefCountedThreadSafe<FileReader> {
virtual ~FileReader();
void ReadFileOnBackgroundThread();
- void RunCallback(bool success, const std::string& data);
ExtensionResource resource_;
- Callback* callback_;
+ Callback callback_;
MessageLoop* origin_loop_;
};
« no previous file with comments | « chrome/browser/extensions/execute_code_in_tab_function.cc ('k') | chrome/browser/extensions/file_reader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698