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

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

Issue 15255002: Files.app: Remove unused private API "chrome.fileBrowserPrivate.getFileLocations". (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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/file_browser_private_api.cc
diff --git a/chrome/browser/chromeos/extensions/file_manager/file_browser_private_api.cc b/chrome/browser/chromeos/extensions/file_manager/file_browser_private_api.cc
index 8b11895dd75fa56b1238d72c571cc4fff0ad0c5b..7284483c3a4a7210b29fc9f0975cab08fe76479b 100644
--- a/chrome/browser/chromeos/extensions/file_manager/file_browser_private_api.cc
+++ b/chrome/browser/chromeos/extensions/file_manager/file_browser_private_api.cc
@@ -573,7 +573,6 @@ FileBrowserPrivateAPI::FileBrowserPrivateAPI(Profile* profile)
registry->RegisterFunction<ViewFilesFunction>();
registry->RegisterFunction<GetDriveEntryPropertiesFunction>();
registry->RegisterFunction<PinDriveFileFunction>();
- registry->RegisterFunction<GetFileLocationsFunction>();
registry->RegisterFunction<GetDriveFilesFunction>();
registry->RegisterFunction<CancelFileTransfersFunction>();
registry->RegisterFunction<TransferFileFunction>();
@@ -2474,42 +2473,6 @@ void PinDriveFileFunction::OnPinStateSet(drive::FileError error) {
}
}
-GetFileLocationsFunction::GetFileLocationsFunction() {
-}
-
-GetFileLocationsFunction::~GetFileLocationsFunction() {
-}
-
-bool GetFileLocationsFunction::RunImpl() {
- ListValue* file_urls_as_strings = NULL;
- if (!args_->GetList(0, &file_urls_as_strings))
- return false;
-
- content::SiteInstance* site_instance = render_view_host()->GetSiteInstance();
- scoped_refptr<fileapi::FileSystemContext> file_system_context =
- BrowserContext::GetStoragePartition(profile(), site_instance)->
- GetFileSystemContext();
-
- // Convert the list of strings to a list of GURLs.
- scoped_ptr<ListValue> locations(new ListValue);
- for (size_t i = 0; i < file_urls_as_strings->GetSize(); ++i) {
- std::string file_url_as_string;
- if (!file_urls_as_strings->GetString(i, &file_url_as_string))
- return false;
-
- fileapi::FileSystemURL url(
- file_system_context->CrackURL(GURL(file_url_as_string)));
- if (url.type() == fileapi::kFileSystemTypeDrive)
- locations->Append(new base::StringValue("drive"));
- else
- locations->Append(new base::StringValue("local"));
- }
-
- SetResult(locations.release());
- SendResponse(true);
- return true;
-}
-
GetDriveFilesFunction::GetDriveFilesFunction()
: local_paths_(NULL) {
}

Powered by Google App Engine
This is Rietveld 408576698