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

Side by Side Diff: chrome/browser/chromeos/extensions/file_manager/private_api_misc.cc

Issue 2038613003: Revert of ExtensionFunction: don't pass ownership of base::Value by raw pointer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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_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 449 matching lines...) Expand 10 before | Expand all | Expand 10 after
460 460
461 void FileManagerPrivateInternalGetMimeTypeFunction::OnGetMimeType( 461 void FileManagerPrivateInternalGetMimeTypeFunction::OnGetMimeType(
462 const std::string& mimeType) { 462 const std::string& mimeType) {
463 SetResult(base::MakeUnique<base::StringValue>(mimeType)); 463 SetResult(base::MakeUnique<base::StringValue>(mimeType));
464 SendResponse(true); 464 SendResponse(true);
465 } 465 }
466 466
467 ExtensionFunction::ResponseAction 467 ExtensionFunction::ResponseAction
468 FileManagerPrivateIsPiexLoaderEnabledFunction::Run() { 468 FileManagerPrivateIsPiexLoaderEnabledFunction::Run() {
469 #if defined(OFFICIAL_BUILD) 469 #if defined(OFFICIAL_BUILD)
470 return RespondNow( 470 return RespondNow(OneArgument(new base::FundamentalValue(true)));
471 OneArgument(base::MakeUnique<base::FundamentalValue>(true)));
472 #else 471 #else
473 return RespondNow( 472 return RespondNow(OneArgument(new base::FundamentalValue(false)));
474 OneArgument(base::MakeUnique<base::FundamentalValue>(false)));
475 #endif 473 #endif
476 } 474 }
477 475
478 FileManagerPrivateGetProvidingExtensionsFunction:: 476 FileManagerPrivateGetProvidingExtensionsFunction::
479 FileManagerPrivateGetProvidingExtensionsFunction() 477 FileManagerPrivateGetProvidingExtensionsFunction()
480 : chrome_details_(this) { 478 : chrome_details_(this) {
481 } 479 }
482 480
483 ExtensionFunction::ResponseAction 481 ExtensionFunction::ResponseAction
484 FileManagerPrivateGetProvidingExtensionsFunction::Run() { 482 FileManagerPrivateGetProvidingExtensionsFunction::Run() {
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
688 base::File::Error result) { 686 base::File::Error result) {
689 if (result != base::File::FILE_OK) { 687 if (result != base::File::FILE_OK) {
690 Respond(Error("Failed to execute the action.")); 688 Respond(Error("Failed to execute the action."));
691 return; 689 return;
692 } 690 }
693 691
694 Respond(NoArguments()); 692 Respond(NoArguments());
695 } 693 }
696 694
697 } // namespace extensions 695 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698