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

Side by Side Diff: chrome/common/extensions/extension.h

Issue 16248002: Move Extension::GetBasicInfo to a static helper. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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_COMMON_EXTENSIONS_EXTENSION_H_ 5 #ifndef CHROME_COMMON_EXTENSIONS_EXTENSION_H_
6 #define CHROME_COMMON_EXTENSIONS_EXTENSION_H_ 6 #define CHROME_COMMON_EXTENSIONS_EXTENSION_H_
7 7
8 #include <algorithm> 8 #include <algorithm>
9 #include <iosfwd> 9 #include <iosfwd>
10 #include <map> 10 #include <map>
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 183
184 // The mimetype used for extensions. 184 // The mimetype used for extensions.
185 static const char kMimeType[]; 185 static const char kMimeType[];
186 186
187 // Checks to see if the extension has a valid ID. 187 // Checks to see if the extension has a valid ID.
188 static bool IdIsValid(const std::string& id); 188 static bool IdIsValid(const std::string& id);
189 189
190 // Returns true if the specified file is an extension. 190 // Returns true if the specified file is an extension.
191 static bool IsExtension(const base::FilePath& file_name); 191 static bool IsExtension(const base::FilePath& file_name);
192 192
193 // Fills the |info| dictionary with basic information about the extension.
194 // |enabled| is injected for easier testing.
195 void GetBasicInfo(bool enabled, base::DictionaryValue* info) const;
196
197 // See Type definition in Manifest. 193 // See Type definition in Manifest.
198 Manifest::Type GetType() const; 194 Manifest::Type GetType() const;
199 195
200 // Returns an absolute url to a resource inside of an extension. The 196 // Returns an absolute url to a resource inside of an extension. The
201 // |extension_url| argument should be the url() from an Extension object. The 197 // |extension_url| argument should be the url() from an Extension object. The
202 // |relative_path| can be untrusted user input. The returned URL will either 198 // |relative_path| can be untrusted user input. The returned URL will either
203 // be invalid() or a child of |extension_url|. 199 // be invalid() or a child of |extension_url|.
204 // NOTE: Static so that it can be used from multiple threads. 200 // NOTE: Static so that it can be used from multiple threads.
205 static GURL GetResourceURL(const GURL& extension_url, 201 static GURL GetResourceURL(const GURL& extension_url,
206 const std::string& relative_path); 202 const std::string& relative_path);
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after
582 578
583 UpdatedExtensionPermissionsInfo( 579 UpdatedExtensionPermissionsInfo(
584 const Extension* extension, 580 const Extension* extension,
585 const PermissionSet* permissions, 581 const PermissionSet* permissions,
586 Reason reason); 582 Reason reason);
587 }; 583 };
588 584
589 } // namespace extensions 585 } // namespace extensions
590 586
591 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_H_ 587 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698