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

Side by Side Diff: chrome/browser/chromeos/extensions/file_system_provider/file_system_provider_api.cc

Issue 1151763007: Add the boilerplate for actions to File System Provider API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed. Created 5 years, 6 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/chromeos/extensions/file_system_provider/file_system_pr ovider_api.h" 5 #include "chrome/browser/chromeos/extensions/file_system_provider/file_system_pr ovider_api.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/memory/linked_ptr.h" 10 #include "base/memory/linked_ptr.h"
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 FileSystemProviderInternalGetMetadataRequestedSuccessFunction::RunWhenValid() { 291 FileSystemProviderInternalGetMetadataRequestedSuccessFunction::RunWhenValid() {
292 using api::file_system_provider_internal::GetMetadataRequestedSuccess::Params; 292 using api::file_system_provider_internal::GetMetadataRequestedSuccess::Params;
293 scoped_ptr<Params> params(Params::Create(*args_)); 293 scoped_ptr<Params> params(Params::Create(*args_));
294 EXTENSION_FUNCTION_VALIDATE(params); 294 EXTENSION_FUNCTION_VALIDATE(params);
295 295
296 return FulfillRequest( 296 return FulfillRequest(
297 RequestValue::CreateForGetMetadataSuccess(params.Pass()), 297 RequestValue::CreateForGetMetadataSuccess(params.Pass()),
298 false /* has_more */); 298 false /* has_more */);
299 } 299 }
300 300
301 bool FileSystemProviderInternalGetActionsRequestedSuccessFunction::
302 RunWhenValid() {
303 using api::file_system_provider_internal::GetActionsRequestedSuccess::Params;
304 scoped_ptr<Params> params(Params::Create(*args_));
305 EXTENSION_FUNCTION_VALIDATE(params);
306
307 return FulfillRequest(RequestValue::CreateForGetActionsSuccess(params.Pass()),
308 false /* has_more */);
309 }
310
301 bool FileSystemProviderInternalReadDirectoryRequestedSuccessFunction:: 311 bool FileSystemProviderInternalReadDirectoryRequestedSuccessFunction::
302 RunWhenValid() { 312 RunWhenValid() {
303 using api::file_system_provider_internal::ReadDirectoryRequestedSuccess:: 313 using api::file_system_provider_internal::ReadDirectoryRequestedSuccess::
304 Params; 314 Params;
305 scoped_ptr<Params> params(Params::Create(*args_)); 315 scoped_ptr<Params> params(Params::Create(*args_));
306 EXTENSION_FUNCTION_VALIDATE(params); 316 EXTENSION_FUNCTION_VALIDATE(params);
307 317
308 const bool has_more = params->has_more; 318 const bool has_more = params->has_more;
309 return FulfillRequest( 319 return FulfillRequest(
310 RequestValue::CreateForReadDirectorySuccess(params.Pass()), has_more); 320 RequestValue::CreateForReadDirectorySuccess(params.Pass()), has_more);
(...skipping 28 matching lines...) Expand all
339 using api::file_system_provider_internal::OperationRequestedError::Params; 349 using api::file_system_provider_internal::OperationRequestedError::Params;
340 scoped_ptr<Params> params(Params::Create(*args_)); 350 scoped_ptr<Params> params(Params::Create(*args_));
341 EXTENSION_FUNCTION_VALIDATE(params); 351 EXTENSION_FUNCTION_VALIDATE(params);
342 352
343 const base::File::Error error = ProviderErrorToFileError(params->error); 353 const base::File::Error error = ProviderErrorToFileError(params->error);
344 return RejectRequest(RequestValue::CreateForOperationError(params.Pass()), 354 return RejectRequest(RequestValue::CreateForOperationError(params.Pass()),
345 error); 355 error);
346 } 356 }
347 357
348 } // namespace extensions 358 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698