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

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

Issue 2025103003: 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(OneArgument(new base::FundamentalValue(true))); 470 return RespondNow(
471 OneArgument(base::MakeUnique<base::FundamentalValue>(true)));
471 #else 472 #else
472 return RespondNow(OneArgument(new base::FundamentalValue(false))); 473 return RespondNow(
474 OneArgument(base::MakeUnique<base::FundamentalValue>(false)));
473 #endif 475 #endif
474 } 476 }
475 477
476 FileManagerPrivateGetProvidingExtensionsFunction:: 478 FileManagerPrivateGetProvidingExtensionsFunction::
477 FileManagerPrivateGetProvidingExtensionsFunction() 479 FileManagerPrivateGetProvidingExtensionsFunction()
478 : chrome_details_(this) { 480 : chrome_details_(this) {
479 } 481 }
480 482
481 ExtensionFunction::ResponseAction 483 ExtensionFunction::ResponseAction
482 FileManagerPrivateGetProvidingExtensionsFunction::Run() { 484 FileManagerPrivateGetProvidingExtensionsFunction::Run() {
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
686 base::File::Error result) { 688 base::File::Error result) {
687 if (result != base::File::FILE_OK) { 689 if (result != base::File::FILE_OK) {
688 Respond(Error("Failed to execute the action.")); 690 Respond(Error("Failed to execute the action."));
689 return; 691 return;
690 } 692 }
691 693
692 Respond(NoArguments()); 694 Respond(NoArguments());
693 } 695 }
694 696
695 } // namespace extensions 697 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698