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

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: Rebased + fixed a comment. Created 5 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 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 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 FileSystemProviderInternalGetMetadataRequestedSuccessFunction::RunWhenValid() { 290 FileSystemProviderInternalGetMetadataRequestedSuccessFunction::RunWhenValid() {
291 using api::file_system_provider_internal::GetMetadataRequestedSuccess::Params; 291 using api::file_system_provider_internal::GetMetadataRequestedSuccess::Params;
292 scoped_ptr<Params> params(Params::Create(*args_)); 292 scoped_ptr<Params> params(Params::Create(*args_));
293 EXTENSION_FUNCTION_VALIDATE(params); 293 EXTENSION_FUNCTION_VALIDATE(params);
294 294
295 return FulfillRequest( 295 return FulfillRequest(
296 RequestValue::CreateForGetMetadataSuccess(params.Pass()), 296 RequestValue::CreateForGetMetadataSuccess(params.Pass()),
297 false /* has_more */); 297 false /* has_more */);
298 } 298 }
299 299
300 bool FileSystemProviderInternalGetActionsRequestedSuccessFunction::
301 RunWhenValid() {
302 using api::file_system_provider_internal::GetActionsRequestedSuccess::Params;
303 scoped_ptr<Params> params(Params::Create(*args_));
304 EXTENSION_FUNCTION_VALIDATE(params);
305
306 return FulfillRequest(RequestValue::CreateForGetActionsSuccess(params.Pass()),
307 false /* has_more */);
308 }
309
300 bool FileSystemProviderInternalReadDirectoryRequestedSuccessFunction:: 310 bool FileSystemProviderInternalReadDirectoryRequestedSuccessFunction::
301 RunWhenValid() { 311 RunWhenValid() {
302 using api::file_system_provider_internal::ReadDirectoryRequestedSuccess:: 312 using api::file_system_provider_internal::ReadDirectoryRequestedSuccess::
303 Params; 313 Params;
304 scoped_ptr<Params> params(Params::Create(*args_)); 314 scoped_ptr<Params> params(Params::Create(*args_));
305 EXTENSION_FUNCTION_VALIDATE(params); 315 EXTENSION_FUNCTION_VALIDATE(params);
306 316
307 const bool has_more = params->has_more; 317 const bool has_more = params->has_more;
308 return FulfillRequest( 318 return FulfillRequest(
309 RequestValue::CreateForReadDirectorySuccess(params.Pass()), has_more); 319 RequestValue::CreateForReadDirectorySuccess(params.Pass()), has_more);
(...skipping 28 matching lines...) Expand all
338 using api::file_system_provider_internal::OperationRequestedError::Params; 348 using api::file_system_provider_internal::OperationRequestedError::Params;
339 scoped_ptr<Params> params(Params::Create(*args_)); 349 scoped_ptr<Params> params(Params::Create(*args_));
340 EXTENSION_FUNCTION_VALIDATE(params); 350 EXTENSION_FUNCTION_VALIDATE(params);
341 351
342 const base::File::Error error = ProviderErrorToFileError(params->error); 352 const base::File::Error error = ProviderErrorToFileError(params->error);
343 return RejectRequest(RequestValue::CreateForOperationError(params.Pass()), 353 return RejectRequest(RequestValue::CreateForOperationError(params.Pass()),
344 error); 354 error);
345 } 355 }
346 356
347 } // namespace extensions 357 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698