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

Unified Diff: content/browser/download/mhtml_generation_manager.cc

Issue 8556001: Convert NewRunnableFunction/NewRunnableMethod calls to use base::Bind(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 9 years, 1 month 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 | « content/browser/download/drag_download_util.cc ('k') | content/browser/net/url_request_failed_dns_job.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/download/mhtml_generation_manager.cc
diff --git a/content/browser/download/mhtml_generation_manager.cc b/content/browser/download/mhtml_generation_manager.cc
index 784e427c9e6541fc48881f6f1f6efba5b209c1e1..4dc70b2ddce5aa0ed6f32dd2f744bd837953dca7 100644
--- a/content/browser/download/mhtml_generation_manager.cc
+++ b/content/browser/download/mhtml_generation_manager.cc
@@ -4,6 +4,7 @@
#include "content/browser/download/mhtml_generation_manager.h"
+#include "base/bind.h"
#include "base/platform_file.h"
#include "content/browser/renderer_host/render_process_host.h"
#include "content/browser/renderer_host/render_view_host.h"
@@ -42,8 +43,8 @@ void MHTMLGenerationManager::GenerateMHTML(TabContents* tab_contents,
base::ProcessHandle renderer_process =
tab_contents->GetRenderProcessHost()->GetHandle();
BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE,
- NewRunnableMethod(this, &MHTMLGenerationManager::CreateFile,
- job_id, file, renderer_process));
+ base::Bind(&MHTMLGenerationManager::CreateFile, this,
+ job_id, file, renderer_process));
}
void MHTMLGenerationManager::MHTMLGenerated(int job_id, int64 mhtml_data_size) {
@@ -65,8 +66,8 @@ void MHTMLGenerationManager::CreateFile(int job_id, const FilePath& file_path,
IPC::GetFileHandleForProcess(browser_file, renderer_process, false);
BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
- NewRunnableMethod(this, &MHTMLGenerationManager::FileCreated,
- job_id, browser_file, renderer_file));
+ base::Bind(&MHTMLGenerationManager::FileCreated, this,
+ job_id, browser_file, renderer_file));
}
void MHTMLGenerationManager::FileCreated(int job_id,
@@ -122,8 +123,7 @@ void MHTMLGenerationManager::JobFinished(int job_id, int64 file_size) {
}
BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE,
- NewRunnableMethod(this, &MHTMLGenerationManager::CloseFile,
- job.browser_file));
+ base::Bind(&MHTMLGenerationManager::CloseFile, this, job.browser_file));
id_to_job_.erase(job_id);
}
« no previous file with comments | « content/browser/download/drag_download_util.cc ('k') | content/browser/net/url_request_failed_dns_job.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698