OLD | NEW |
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_manager/private_api_misc.h" | 5 #include "chrome/browser/chromeos/extensions/file_manager/private_api_misc.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <set> | 9 #include <set> |
10 #include <vector> | 10 #include <vector> |
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
277 | 277 |
278 (new file_manager::ZipFileCreator( | 278 (new file_manager::ZipFileCreator( |
279 base::Bind(&FileManagerPrivateInternalZipSelectionFunction::OnZipDone, | 279 base::Bind(&FileManagerPrivateInternalZipSelectionFunction::OnZipDone, |
280 this), | 280 this), |
281 src_dir, src_relative_paths, dest_file)) | 281 src_dir, src_relative_paths, dest_file)) |
282 ->Start(); | 282 ->Start(); |
283 return true; | 283 return true; |
284 } | 284 } |
285 | 285 |
286 void FileManagerPrivateInternalZipSelectionFunction::OnZipDone(bool success) { | 286 void FileManagerPrivateInternalZipSelectionFunction::OnZipDone(bool success) { |
287 SetResult(base::MakeUnique<base::FundamentalValue>(success)); | 287 SetResult(base::MakeUnique<base::Value>(success)); |
288 SendResponse(true); | 288 SendResponse(true); |
289 } | 289 } |
290 | 290 |
291 ExtensionFunction::ResponseAction FileManagerPrivateZoomFunction::Run() { | 291 ExtensionFunction::ResponseAction FileManagerPrivateZoomFunction::Run() { |
292 using extensions::api::file_manager_private::Zoom::Params; | 292 using extensions::api::file_manager_private::Zoom::Params; |
293 const std::unique_ptr<Params> params(Params::Create(*args_)); | 293 const std::unique_ptr<Params> params(Params::Create(*args_)); |
294 EXTENSION_FUNCTION_VALIDATE(params); | 294 EXTENSION_FUNCTION_VALIDATE(params); |
295 | 295 |
296 content::PageZoom zoom_type; | 296 content::PageZoom zoom_type; |
297 switch (params->operation) { | 297 switch (params->operation) { |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
466 | 466 |
467 void FileManagerPrivateInternalGetMimeTypeFunction::OnGetMimeType( | 467 void FileManagerPrivateInternalGetMimeTypeFunction::OnGetMimeType( |
468 const std::string& mimeType) { | 468 const std::string& mimeType) { |
469 SetResult(base::MakeUnique<base::StringValue>(mimeType)); | 469 SetResult(base::MakeUnique<base::StringValue>(mimeType)); |
470 SendResponse(true); | 470 SendResponse(true); |
471 } | 471 } |
472 | 472 |
473 ExtensionFunction::ResponseAction | 473 ExtensionFunction::ResponseAction |
474 FileManagerPrivateIsPiexLoaderEnabledFunction::Run() { | 474 FileManagerPrivateIsPiexLoaderEnabledFunction::Run() { |
475 #if defined(OFFICIAL_BUILD) | 475 #if defined(OFFICIAL_BUILD) |
476 return RespondNow( | 476 return RespondNow(OneArgument(base::MakeUnique<base::Value>(true))); |
477 OneArgument(base::MakeUnique<base::FundamentalValue>(true))); | |
478 #else | 477 #else |
479 return RespondNow( | 478 return RespondNow(OneArgument(base::MakeUnique<base::Value>(false))); |
480 OneArgument(base::MakeUnique<base::FundamentalValue>(false))); | |
481 #endif | 479 #endif |
482 } | 480 } |
483 | 481 |
484 FileManagerPrivateGetProvidingExtensionsFunction:: | 482 FileManagerPrivateGetProvidingExtensionsFunction:: |
485 FileManagerPrivateGetProvidingExtensionsFunction() | 483 FileManagerPrivateGetProvidingExtensionsFunction() |
486 : chrome_details_(this) { | 484 : chrome_details_(this) { |
487 } | 485 } |
488 | 486 |
489 ExtensionFunction::ResponseAction | 487 ExtensionFunction::ResponseAction |
490 FileManagerPrivateGetProvidingExtensionsFunction::Run() { | 488 FileManagerPrivateGetProvidingExtensionsFunction::Run() { |
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
694 base::File::Error result) { | 692 base::File::Error result) { |
695 if (result != base::File::FILE_OK) { | 693 if (result != base::File::FILE_OK) { |
696 Respond(Error("Failed to execute the action.")); | 694 Respond(Error("Failed to execute the action.")); |
697 return; | 695 return; |
698 } | 696 } |
699 | 697 |
700 Respond(NoArguments()); | 698 Respond(NoArguments()); |
701 } | 699 } |
702 | 700 |
703 } // namespace extensions | 701 } // namespace extensions |
OLD | NEW |