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

Side by Side Diff: chrome/browser/extensions/extension_util.h

Issue 1871713002: Convert //chrome/browser/extensions from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_UTIL_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_UTIL_H_
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_UTIL_H_ 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_UTIL_H_
7 7
8 #include <memory>
8 #include <string> 9 #include <string>
9 10
10 #include "base/memory/scoped_ptr.h"
11 #include "url/gurl.h" 11 #include "url/gurl.h"
12 12
13 namespace base { 13 namespace base {
14 class DictionaryValue; 14 class DictionaryValue;
15 } 15 }
16 16
17 namespace content { 17 namespace content {
18 class BrowserContext; 18 class BrowserContext;
19 } 19 }
20 20
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 bool IsExtensionIdle(const std::string& extension_id, 105 bool IsExtensionIdle(const std::string& extension_id,
106 content::BrowserContext* context); 106 content::BrowserContext* context);
107 107
108 // Returns the site of the |extension_id|, given the associated |context|. 108 // Returns the site of the |extension_id|, given the associated |context|.
109 // Suitable for use with BrowserContext::GetStoragePartitionForSite(). 109 // Suitable for use with BrowserContext::GetStoragePartitionForSite().
110 GURL GetSiteForExtensionId(const std::string& extension_id, 110 GURL GetSiteForExtensionId(const std::string& extension_id,
111 content::BrowserContext* context); 111 content::BrowserContext* context);
112 112
113 // Sets the name, id, and icon resource path of the given extension into the 113 // Sets the name, id, and icon resource path of the given extension into the
114 // returned dictionary. 114 // returned dictionary.
115 scoped_ptr<base::DictionaryValue> GetExtensionInfo(const Extension* extension); 115 std::unique_ptr<base::DictionaryValue> GetExtensionInfo(
116 const Extension* extension);
116 117
117 // Returns the default extension/app icon (for extensions or apps that don't 118 // Returns the default extension/app icon (for extensions or apps that don't
118 // have one). 119 // have one).
119 const gfx::ImageSkia& GetDefaultExtensionIcon(); 120 const gfx::ImageSkia& GetDefaultExtensionIcon();
120 const gfx::ImageSkia& GetDefaultAppIcon(); 121 const gfx::ImageSkia& GetDefaultAppIcon();
121 122
122 // Returns true if the bookmark apps feature is enabled. 123 // Returns true if the bookmark apps feature is enabled.
123 // 124 //
124 // TODO(benwells): http://crbug.com/441128: Remove this entirely once the 125 // TODO(benwells): http://crbug.com/441128: Remove this entirely once the
125 // feature is stable. 126 // feature is stable.
126 bool IsNewBookmarkAppsEnabled(); 127 bool IsNewBookmarkAppsEnabled();
127 128
128 // TODO(dominickn): http://crbug.com/517682: Remove this entirely once 129 // TODO(dominickn): http://crbug.com/517682: Remove this entirely once
129 // open in window is stable on Mac. 130 // open in window is stable on Mac.
130 bool CanHostedAppsOpenInWindows(); 131 bool CanHostedAppsOpenInWindows();
131 132
132 // Returns true for custodian-installed extensions in a supervised profile. 133 // Returns true for custodian-installed extensions in a supervised profile.
133 bool IsExtensionSupervised(const Extension* extension, const Profile* profile); 134 bool IsExtensionSupervised(const Extension* extension, const Profile* profile);
134 135
135 // Returns true if supervised users need approval from their custodian for 136 // Returns true if supervised users need approval from their custodian for
136 // approving escalated permissions on updated extensions. 137 // approving escalated permissions on updated extensions.
137 bool NeedCustodianApprovalForPermissionIncrease(const Profile* profile); 138 bool NeedCustodianApprovalForPermissionIncrease(const Profile* profile);
138 139
139 } // namespace util 140 } // namespace util
140 } // namespace extensions 141 } // namespace extensions
141 142
142 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_UTIL_H_ 143 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698