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

Side by Side Diff: chrome/browser/extensions/api/module/module.cc

Issue 2664753002: Remove base::StringValue (Closed)
Patch Set: Rebase Created 3 years, 9 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/extensions/api/module/module.h" 5 #include "chrome/browser/extensions/api/module/module.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 29 matching lines...) Expand all
40 ExtensionFunction::ResponseAction ExtensionSetUpdateUrlDataFunction::Run() { 40 ExtensionFunction::ResponseAction ExtensionSetUpdateUrlDataFunction::Run() {
41 std::string data; 41 std::string data;
42 EXTENSION_FUNCTION_VALIDATE(args_->GetString(0, &data)); 42 EXTENSION_FUNCTION_VALIDATE(args_->GetString(0, &data));
43 43
44 if (ManifestURL::UpdatesFromGallery(extension())) { 44 if (ManifestURL::UpdatesFromGallery(extension())) {
45 return RespondNow(Error(kUnknownErrorDoNotUse)); 45 return RespondNow(Error(kUnknownErrorDoNotUse));
46 } 46 }
47 47
48 ExtensionPrefs::Get(browser_context()) 48 ExtensionPrefs::Get(browser_context())
49 ->UpdateExtensionPref(extension_id(), extension::kUpdateURLData, 49 ->UpdateExtensionPref(extension_id(), extension::kUpdateURLData,
50 new base::StringValue(data)); 50 new base::Value(data));
51 return RespondNow(NoArguments()); 51 return RespondNow(NoArguments());
52 } 52 }
53 53
54 ExtensionFunction::ResponseAction 54 ExtensionFunction::ResponseAction
55 ExtensionIsAllowedIncognitoAccessFunction::Run() { 55 ExtensionIsAllowedIncognitoAccessFunction::Run() {
56 return RespondNow(OneArgument(base::MakeUnique<base::Value>( 56 return RespondNow(OneArgument(base::MakeUnique<base::Value>(
57 util::IsIncognitoEnabled(extension_id(), browser_context())))); 57 util::IsIncognitoEnabled(extension_id(), browser_context()))));
58 } 58 }
59 59
60 ExtensionFunction::ResponseAction 60 ExtensionFunction::ResponseAction
61 ExtensionIsAllowedFileSchemeAccessFunction::Run() { 61 ExtensionIsAllowedFileSchemeAccessFunction::Run() {
62 return RespondNow(OneArgument(base::MakeUnique<base::Value>( 62 return RespondNow(OneArgument(base::MakeUnique<base::Value>(
63 util::AllowFileAccess(extension_id(), browser_context())))); 63 util::AllowFileAccess(extension_id(), browser_context()))));
64 } 64 }
65 65
66 } // namespace extensions 66 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698