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

Unified Diff: chrome/browser/chromeos/extensions/file_system_provider/file_system_provider_api.cc

Issue 209663006: [fsp] Simplify ID of provided file systems. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed comments. Created 6 years, 9 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/file_system_provider/provided_file_system.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/extensions/file_system_provider/file_system_provider_api.cc
diff --git a/chrome/browser/chromeos/extensions/file_system_provider/file_system_provider_api.cc b/chrome/browser/chromeos/extensions/file_system_provider/file_system_provider_api.cc
index 8863736d007671bb937f4226fead0ffa252250d6..e891b1cd92d9016a80a6b4d0b5fe49d7ab29820e 100644
--- a/chrome/browser/chromeos/extensions/file_system_provider/file_system_provider_api.cc
+++ b/chrome/browser/chromeos/extensions/file_system_provider/file_system_provider_api.cc
@@ -51,15 +51,15 @@ bool FileSystemProviderMountFunction::RunImpl() {
chromeos::file_system_provider::Service::Get(GetProfile());
DCHECK(service);
- const std::string file_system_id =
+ int file_system_id =
service->RegisterFileSystem(extension_id(), params->display_name);
- // If the |file_system_id| is empty, then it means that registering the file
+ // If the |file_system_id| is zero, then it means that registering the file
// system failed.
// TODO(mtomasz): Pass more detailed errors, rather than just a bool.
- if (file_system_id.empty()) {
+ if (!file_system_id) {
base::ListValue* result = new base::ListValue();
- result->Append(new base::StringValue(""));
+ result->Append(new base::FundamentalValue(0));
result->Append(
CreateError(kSecurityErrorName, kRegisteringFailedErrorMessage));
SetResult(result);
@@ -67,7 +67,7 @@ bool FileSystemProviderMountFunction::RunImpl() {
}
base::ListValue* result = new base::ListValue();
- result->Append(new base::StringValue(file_system_id));
+ result->Append(new base::FundamentalValue(file_system_id));
// Don't append an error on success.
SetResult(result);
« no previous file with comments | « no previous file | chrome/browser/chromeos/file_system_provider/provided_file_system.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698