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

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

Issue 22885002: c/b/extensions, json_schema_compiler: Do not use Value::Create*. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Removed C-style casts. Created 7 years, 4 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/values.h" 9 #include "base/values.h"
10 #include "chrome/browser/extensions/extension_prefs.h" 10 #include "chrome/browser/extensions/extension_prefs.h"
(...skipping 23 matching lines...) Expand all
34 34
35 } // namespace extension 35 } // namespace extension
36 36
37 bool ExtensionSetUpdateUrlDataFunction::RunImpl() { 37 bool ExtensionSetUpdateUrlDataFunction::RunImpl() {
38 std::string data; 38 std::string data;
39 EXTENSION_FUNCTION_VALIDATE(args_->GetString(0, &data)); 39 EXTENSION_FUNCTION_VALIDATE(args_->GetString(0, &data));
40 40
41 ExtensionPrefs::Get(profile())->UpdateExtensionPref( 41 ExtensionPrefs::Get(profile())->UpdateExtensionPref(
42 extension_id(), 42 extension_id(),
43 extension::kUpdateURLData, 43 extension::kUpdateURLData,
44 base::Value::CreateStringValue(data)); 44 new base::StringValue(data));
45 return true; 45 return true;
46 } 46 }
47 47
48 bool ExtensionIsAllowedIncognitoAccessFunction::RunImpl() { 48 bool ExtensionIsAllowedIncognitoAccessFunction::RunImpl() {
49 ExtensionService* ext_service = 49 ExtensionService* ext_service =
50 ExtensionSystem::Get(profile())->extension_service(); 50 ExtensionSystem::Get(profile())->extension_service();
51 const Extension* extension = GetExtension(); 51 const Extension* extension = GetExtension();
52 52
53 SetResult(Value::CreateBooleanValue( 53 SetResult(new base::FundamentalValue(
54 ext_service->IsIncognitoEnabled(extension->id()))); 54 ext_service->IsIncognitoEnabled(extension->id())));
55 return true; 55 return true;
56 } 56 }
57 57
58 bool ExtensionIsAllowedFileSchemeAccessFunction::RunImpl() { 58 bool ExtensionIsAllowedFileSchemeAccessFunction::RunImpl() {
59 ExtensionService* ext_service = 59 ExtensionService* ext_service =
60 ExtensionSystem::Get(profile())->extension_service(); 60 ExtensionSystem::Get(profile())->extension_service();
61 const Extension* extension = GetExtension(); 61 const Extension* extension = GetExtension();
62 62
63 SetResult(Value::CreateBooleanValue( 63 SetResult(new base::FundamentalValue(
64 ext_service->AllowFileAccess(extension))); 64 ext_service->AllowFileAccess(extension)));
65 return true; 65 return true;
66 } 66 }
67 67
68 } // namespace extensions 68 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698