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

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

Issue 147993003: Clarify and separate the concept of "Drive path" and "Filesystem relative path". (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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_drive.cc
diff --git a/chrome/browser/chromeos/extensions/file_manager/private_api_drive.cc b/chrome/browser/chromeos/extensions/file_manager/private_api_drive.cc
index 139ca7e50294023cb5cdc23cdb5c5728952a5e2c..dd43e4db89046e79445e7ff6cf3d6827fb628748 100644
--- a/chrome/browser/chromeos/extensions/file_manager/private_api_drive.cc
+++ b/chrome/browser/chromeos/extensions/file_manager/private_api_drive.cc
@@ -8,6 +8,7 @@
#include "chrome/browser/chromeos/drive/logging.h"
#include "chrome/browser/chromeos/extensions/file_manager/private_api_util.h"
#include "chrome/browser/chromeos/file_manager/file_tasks.h"
+#include "chrome/browser/chromeos/file_manager/fileapi_util.h"
#include "chrome/browser/chromeos/file_manager/url_util.h"
#include "chrome/browser/chromeos/fileapi/file_system_backend.h"
#include "chrome/browser/drive/drive_app_registry.h"
@@ -404,7 +405,9 @@ void FileBrowserPrivateSearchDriveFunction::OnSearch(
base::DictionaryValue* entry = new base::DictionaryValue();
entry->SetString("fileSystemName", info.name);
entry->SetString("fileSystemRoot", info.root_url.spec());
- entry->SetString("fileFullPath", "/" + results->at(i).path.value());
+ entry->SetString("fileFullPath",
+ "/" + file_manager::util::ConvertDrivePathToRelativeFileSystemPath(
+ GetProfile(), results->at(i).path).AsUTF8Unsafe());
entry->SetBoolean("fileIsDirectory", results->at(i).is_directory);
entries->Append(entry);
}
@@ -491,7 +494,9 @@ void FileBrowserPrivateSearchDriveMetadataFunction::OnSearchMetadata(
base::DictionaryValue* entry = new base::DictionaryValue();
entry->SetString("fileSystemName", info.name);
entry->SetString("fileSystemRoot", info.root_url.spec());
- entry->SetString("fileFullPath", "/" + results->at(i).path.value());
+ entry->SetString("fileFullPath",
+ "/" + file_manager::util::ConvertDrivePathToRelativeFileSystemPath(
+ GetProfile(), results->at(i).path).AsUTF8Unsafe());
entry->SetBoolean("fileIsDirectory",
results->at(i).entry.file_info().is_directory());

Powered by Google App Engine
This is Rietveld 408576698