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

Unified Diff: chrome/browser/chromeos/extensions/file_manager/private_api_dialog.cc

Issue 22165002: Change the meaning of SelectFileDialog.support_drive: it means Drive-aware callers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review fix (#2). Created 7 years, 4 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 | « no previous file | chrome/browser/chromeos/extensions/file_manager/private_api_mount.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/extensions/file_manager/private_api_dialog.cc
diff --git a/chrome/browser/chromeos/extensions/file_manager/private_api_dialog.cc b/chrome/browser/chromeos/extensions/file_manager/private_api_dialog.cc
index b5370ae3933973d67c7b6b3944ca513d5a463347..9ea1bf28648bd729130842320cbc674096d5fd63 100644
--- a/chrome/browser/chromeos/extensions/file_manager/private_api_dialog.cc
+++ b/chrome/browser/chromeos/extensions/file_manager/private_api_dialog.cc
@@ -42,12 +42,21 @@ bool SelectFileFunction::RunImpl() {
file_paths.push_back(GURL(file_url));
bool for_opening = false;
args_->GetBoolean(2, &for_opening);
+ bool need_local_path = false;
+ args_->GetBoolean(3, &need_local_path);
+
+ util::GetSelectedFileInfoLocalPathOption option =
+ util::NO_LOCAL_PATH_RESOLUTION;
+ if (need_local_path) {
+ option = for_opening ?
+ util::NEED_LOCAL_PATH_FOR_OPENING : util::NEED_LOCAL_PATH_FOR_SAVING;
+ }
util::GetSelectedFileInfo(
render_view_host(),
profile(),
file_paths,
- for_opening,
+ option,
base::Bind(&SelectFileFunction::GetSelectedFileInfoResponse, this));
return true;
}
@@ -90,11 +99,15 @@ bool SelectFilesFunction::RunImpl() {
file_urls.push_back(GURL(virtual_path));
}
+ bool need_local_path = false;
+ args_->GetBoolean(1, &need_local_path);
+
util::GetSelectedFileInfo(
render_view_host(),
profile(),
file_urls,
- true, // for_opening
+ need_local_path ?
+ util::NEED_LOCAL_PATH_FOR_OPENING : util::NO_LOCAL_PATH_RESOLUTION,
base::Bind(&SelectFilesFunction::GetSelectedFileInfoResponse, this));
return true;
}
« no previous file with comments | « no previous file | chrome/browser/chromeos/extensions/file_manager/private_api_mount.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698