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

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

Issue 22523003: Enable Google Drive in all save-file dialogs of Chrome OS. (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
« no previous file with comments | « no previous file | chrome/browser/resources/file_manager/js/file_manager.js » ('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_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 be35838e8b98fd0d2299d244be541b8838f18eb7..c1e183954bd105d9d4687b66be4c139bffd904a4 100644
--- a/chrome/browser/chromeos/extensions/file_manager/private_api_util.cc
+++ b/chrome/browser/chromeos/extensions/file_manager/private_api_util.cc
@@ -70,13 +70,19 @@ void GetSelectedFileInfoInternal(Profile* profile,
scoped_ptr<drive::ResourceEntry>());
return;
}
- // TODO(kinaba): crbug.com/140425 support FOR_SAVING
- DCHECK(params->local_path_option == NEED_LOCAL_PATH_FOR_OPENING);
- integration_service->file_system()->GetFileByPath(
- drive::util::ExtractDrivePath(file_path),
- base::Bind(&ContinueGetSelectedFileInfo,
- profile,
- base::Passed(&params)));
+ if (params->local_path_option == NEED_LOCAL_PATH_FOR_OPENING) {
+ integration_service->file_system()->GetFileByPath(
+ drive::util::ExtractDrivePath(file_path),
+ base::Bind(&ContinueGetSelectedFileInfo,
+ profile,
+ base::Passed(&params)));
+ } else {
hashimoto 2013/08/08 07:07:28 nit: Can't we have DCHECK_EQ(NEED_LOCAL_PATH_FOR_S
kinaba 2013/08/08 08:07:13 Done.
+ integration_service->file_system()->GetFileByPathForSaving(
+ drive::util::ExtractDrivePath(file_path),
+ base::Bind(&ContinueGetSelectedFileInfo,
+ profile,
+ base::Passed(&params)));
+ }
return;
}
}
« no previous file with comments | « no previous file | chrome/browser/resources/file_manager/js/file_manager.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698