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

Unified Diff: chrome/browser/file_select_helper.cc

Issue 7464009: Removal of Profile from content part 1. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: works now Created 9 years, 5 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/file_select_helper.cc
diff --git a/chrome/browser/file_select_helper.cc b/chrome/browser/file_select_helper.cc
index 4ca416edb5b2dba9017f3632ad7b722c1c3f29b7..0ecce481db23cf97e050049662e39b5c92d3a9d1 100644
--- a/chrome/browser/file_select_helper.cc
+++ b/chrome/browser/file_select_helper.cc
@@ -317,8 +317,10 @@ bool FileSelectObserver::OnMessageReceived(const IPC::Message& message) {
void FileSelectObserver::OnRunFileChooser(
const ViewHostMsg_RunFileChooser_Params& params) {
- if (!file_select_helper_.get())
- file_select_helper_.reset(new FileSelectHelper(tab_contents()->profile()));
+ if (!file_select_helper_.get()) {
+ Profile* profile = static_cast<Profile*>(tab_contents()->context());
+ file_select_helper_.reset(new FileSelectHelper(profile));
+ }
file_select_helper_->RunFileChooser(tab_contents()->render_view_host(),
tab_contents(),
params);
@@ -334,8 +336,10 @@ void FileSelectObserver::OnEnumerateDirectory(int request_id,
return;
}
- if (!file_select_helper_.get())
- file_select_helper_.reset(new FileSelectHelper(tab_contents()->profile()));
+ if (!file_select_helper_.get()) {
+ Profile* profile = static_cast<Profile*>(tab_contents()->context());
+ file_select_helper_.reset(new FileSelectHelper(profile));
+ }
file_select_helper_->EnumerateDirectory(request_id,
tab_contents()->render_view_host(),
path);

Powered by Google App Engine
This is Rietveld 408576698