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

Unified Diff: chrome/browser/chromeos/extensions/file_manager/private_api_util.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: 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
Index: chrome/browser/chromeos/extensions/file_manager/private_api_util.cc
diff --git a/chrome/browser/chromeos/extensions/file_manager/private_api_util.cc b/chrome/browser/chromeos/extensions/file_manager/private_api_util.cc
index 4998a4fe7804076e169a2429978a7279585ab790..8293eb771fda8835b78d4e18d82794f2f90d060d 100644
--- a/chrome/browser/chromeos/extensions/file_manager/private_api_util.cc
+++ b/chrome/browser/chromeos/extensions/file_manager/private_api_util.cc
@@ -32,6 +32,7 @@ namespace {
// The struct is used for GetSelectedFileInfo().
struct GetSelectedFileInfoParams {
bool for_opening;
+ bool need_local_path;
GetSelectedFileInfoCallback callback;
std::vector<base::FilePath> file_paths;
std::vector<ui::SelectedFileInfo> selected_files;
@@ -54,6 +55,7 @@ void GetSelectedFileInfoInternal(Profile* profile,
const base::FilePath& file_path = params->file_paths[i];
// When opening a drive file, we should get local file path.
satorux1 2013/08/06 02:07:17 the comment needs to be updated? now need_local_pa
kinaba 2013/08/06 06:20:56 Done.
if (params->for_opening &&
+ params->need_local_path &&
drive::util::IsUnderDriveMountPoint(file_path)) {
drive::DriveIntegrationService* integration_service =
drive::DriveIntegrationServiceFactory::GetForProfile(profile);
@@ -158,12 +160,14 @@ void GetSelectedFileInfo(content::RenderViewHost* render_view_host,
Profile* profile,
const std::vector<GURL>& file_urls,
bool for_opening,
+ bool need_local_path,
GetSelectedFileInfoCallback callback) {
DCHECK(render_view_host);
DCHECK(profile);
scoped_ptr<GetSelectedFileInfoParams> params(new GetSelectedFileInfoParams);
params->for_opening = for_opening;
+ params->need_local_path = need_local_path;
params->callback = callback;
for (size_t i = 0; i < file_urls.size(); ++i) {

Powered by Google App Engine
This is Rietveld 408576698