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

Side by Side Diff: chrome/default_plugin/plugin_install_job_monitor.cc

Issue 8603007: More base::Bind migrations. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: code review tweak, rebase 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/user_style_sheet_watcher.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/default_plugin/plugin_install_job_monitor.h" 5 #include "chrome/default_plugin/plugin_install_job_monitor.h"
6 6
7 #include "base/bind.h"
7 #include "base/message_loop.h" 8 #include "base/message_loop.h"
8 #include "chrome/default_plugin/plugin_impl.h" 9 #include "chrome/default_plugin/plugin_impl.h"
9 10
10 PluginInstallationJobMonitorThread::PluginInstallationJobMonitorThread() 11 PluginInstallationJobMonitorThread::PluginInstallationJobMonitorThread()
11 : Thread("Chrome plugin install thread"), 12 : Thread("Chrome plugin install thread"),
12 install_job_completion_port_(NULL), 13 install_job_completion_port_(NULL),
13 stop_job_monitoring_(false), 14 stop_job_monitoring_(false),
14 plugin_window_(NULL), 15 plugin_window_(NULL),
15 install_job_(NULL) { 16 install_job_(NULL) {
16 } 17 }
(...skipping 17 matching lines...) Expand all
34 DLOG(ERROR) << "Failed to create plugin install job. Error = " 35 DLOG(ERROR) << "Failed to create plugin install job. Error = "
35 << ::GetLastError(); 36 << ::GetLastError();
36 NOTREACHED(); 37 NOTREACHED();
37 return false; 38 return false;
38 } 39 }
39 40
40 return Start(); 41 return Start();
41 } 42 }
42 43
43 void PluginInstallationJobMonitorThread::Init() { 44 void PluginInstallationJobMonitorThread::Init() {
44 this->message_loop()->PostTask(FROM_HERE, 45 this->message_loop()->PostTask(
45 NewRunnableMethod(this, 46 FROM_HERE,
46 &PluginInstallationJobMonitorThread::WaitForJobThread)); 47 base::Bind(&PluginInstallationJobMonitorThread::WaitForJobThread, this));
47 } 48 }
48 49
49 void PluginInstallationJobMonitorThread::WaitForJobThread() { 50 void PluginInstallationJobMonitorThread::WaitForJobThread() {
50 if (!install_job_) { 51 if (!install_job_) {
51 DLOG(WARNING) << "Invalid job information"; 52 DLOG(WARNING) << "Invalid job information";
52 NOTREACHED(); 53 NOTREACHED();
53 return; 54 return;
54 } 55 }
55 56
56 DCHECK(install_job_completion_port_ == NULL); 57 DCHECK(install_job_completion_port_ == NULL);
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 Thread::Stop(); 102 Thread::Stop();
102 ::CloseHandle(install_job_completion_port_); 103 ::CloseHandle(install_job_completion_port_);
103 install_job_completion_port_ = NULL; 104 install_job_completion_port_ = NULL;
104 } 105 }
105 106
106 bool PluginInstallationJobMonitorThread::AssignProcessToJob( 107 bool PluginInstallationJobMonitorThread::AssignProcessToJob(
107 HANDLE process_handle) { 108 HANDLE process_handle) {
108 BOOL result = AssignProcessToJobObject(install_job_, process_handle); 109 BOOL result = AssignProcessToJobObject(install_job_, process_handle);
109 return result ? true : false; 110 return result ? true : false;
110 } 111 }
OLDNEW
« no previous file with comments | « chrome/browser/user_style_sheet_watcher.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698