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

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

Issue 1991083002: Remove ExtensionFunction::SetResult(T*) overload. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: IWYU Created 4 years, 7 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/values.h" 10 #include "base/values.h"
10 #include "chrome/browser/extensions/extension_service.h" 11 #include "chrome/browser/extensions/extension_service.h"
11 #include "chrome/browser/extensions/extension_util.h" 12 #include "chrome/browser/extensions/extension_util.h"
12 #include "chrome/browser/profiles/profile.h" 13 #include "chrome/browser/profiles/profile.h"
13 #include "extensions/browser/extension_prefs.h" 14 #include "extensions/browser/extension_prefs.h"
14 #include "extensions/browser/extension_system.h" 15 #include "extensions/browser/extension_system.h"
15 #include "extensions/common/manifest_url_handlers.h" 16 #include "extensions/common/manifest_url_handlers.h"
16 17
17 namespace extensions { 18 namespace extensions {
18 19
(...skipping 24 matching lines...) Expand all
43 if (ManifestURL::UpdatesFromGallery(extension())) { 44 if (ManifestURL::UpdatesFromGallery(extension())) {
44 return false; 45 return false;
45 } 46 }
46 47
47 ExtensionPrefs::Get(GetProfile())->UpdateExtensionPref( 48 ExtensionPrefs::Get(GetProfile())->UpdateExtensionPref(
48 extension_id(), extension::kUpdateURLData, new base::StringValue(data)); 49 extension_id(), extension::kUpdateURLData, new base::StringValue(data));
49 return true; 50 return true;
50 } 51 }
51 52
52 bool ExtensionIsAllowedIncognitoAccessFunction::RunSync() { 53 bool ExtensionIsAllowedIncognitoAccessFunction::RunSync() {
53 SetResult(new base::FundamentalValue( 54 SetResult(base::MakeUnique<base::FundamentalValue>(
54 util::IsIncognitoEnabled(extension_id(), GetProfile()))); 55 util::IsIncognitoEnabled(extension_id(), GetProfile())));
55 return true; 56 return true;
56 } 57 }
57 58
58 bool ExtensionIsAllowedFileSchemeAccessFunction::RunSync() { 59 bool ExtensionIsAllowedFileSchemeAccessFunction::RunSync() {
59 SetResult(new base::FundamentalValue( 60 SetResult(base::MakeUnique<base::FundamentalValue>(
60 util::AllowFileAccess(extension_id(), GetProfile()))); 61 util::AllowFileAccess(extension_id(), GetProfile())));
61 return true; 62 return true;
62 } 63 }
63 64
64 } // namespace extensions 65 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698