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

Side by Side Diff: chrome/browser/plugin_installer.cc

Issue 9473001: Extract minimal RenderViewHost interface for embedders, leaving (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to LKGR. Created 8 years, 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/browser/plugin_installer.h" 5 #include "chrome/browser/plugin_installer.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/process.h" 10 #include "base/process.h"
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 DownloadService* download_service = 141 DownloadService* download_service =
142 DownloadServiceFactory::GetForProfile(wrapper->profile()); 142 DownloadServiceFactory::GetForProfile(wrapper->profile());
143 download_util::RecordDownloadSource( 143 download_util::RecordDownloadSource(
144 download_util::INITIATED_BY_PLUGIN_INSTALLER); 144 download_util::INITIATED_BY_PLUGIN_INSTALLER);
145 BrowserThread::PostTask( 145 BrowserThread::PostTask(
146 BrowserThread::IO, FROM_HERE, 146 BrowserThread::IO, FROM_HERE,
147 base::Bind(&BeginDownload, 147 base::Bind(&BeginDownload,
148 plugin_url_, ResourceDispatcherHost::Get(), 148 plugin_url_, ResourceDispatcherHost::Get(),
149 wrapper->profile()->GetResourceContext(), 149 wrapper->profile()->GetResourceContext(),
150 web_contents->GetRenderProcessHost()->GetID(), 150 web_contents->GetRenderProcessHost()->GetID(),
151 web_contents->GetRenderViewHost()->routing_id(), 151 web_contents->GetRenderViewHost()->GetRoutingID(),
152 base::Bind(&PluginInstaller::DownloadStarted, 152 base::Bind(&PluginInstaller::DownloadStarted,
153 base::Unretained(this), 153 base::Unretained(this),
154 make_scoped_refptr( 154 make_scoped_refptr(
155 download_service->GetDownloadManager())))); 155 download_service->GetDownloadManager()))));
156 } 156 }
157 157
158 void PluginInstaller::DownloadStarted( 158 void PluginInstaller::DownloadStarted(
159 scoped_refptr<content::DownloadManager> dlm, 159 scoped_refptr<content::DownloadManager> dlm,
160 content::DownloadId download_id, 160 content::DownloadId download_id,
161 net::Error error) { 161 net::Error error) {
(...skipping 24 matching lines...) Expand all
186 DCHECK(state_ == kStateDownloading); 186 DCHECK(state_ == kStateDownloading);
187 state_ = kStateIdle; 187 state_ = kStateIdle;
188 FOR_EACH_OBSERVER(PluginInstallerObserver, observers_, DownloadError(msg)); 188 FOR_EACH_OBSERVER(PluginInstallerObserver, observers_, DownloadError(msg));
189 } 189 }
190 190
191 void PluginInstaller::DownloadCancelled() { 191 void PluginInstaller::DownloadCancelled() {
192 DCHECK(state_ == kStateDownloading); 192 DCHECK(state_ == kStateDownloading);
193 state_ = kStateIdle; 193 state_ = kStateIdle;
194 FOR_EACH_OBSERVER(PluginInstallerObserver, observers_, DownloadCancelled()); 194 FOR_EACH_OBSERVER(PluginInstallerObserver, observers_, DownloadCancelled());
195 } 195 }
OLDNEW
« no previous file with comments | « chrome/browser/password_manager_delegate_impl.cc ('k') | chrome/browser/prerender/prerender_contents.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698