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

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

Issue 10389137: Coverity: Fix pass by value error. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/common/extensions/extension_permission_set.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef CHROME_COMMON_EXTENSIONS_EXTENSION_PERMISSION_SET_H_ 5 #ifndef CHROME_COMMON_EXTENSIONS_EXTENSION_PERMISSION_SET_H_
6 #define CHROME_COMMON_EXTENSIONS_EXTENSION_PERMISSION_SET_H_ 6 #define CHROME_COMMON_EXTENSIONS_EXTENSION_PERMISSION_SET_H_
7 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 class ExtensionPermissionsInfo { 224 class ExtensionPermissionsInfo {
225 public: 225 public:
226 // Returns a pointer to the singleton instance. 226 // Returns a pointer to the singleton instance.
227 static ExtensionPermissionsInfo* GetInstance(); 227 static ExtensionPermissionsInfo* GetInstance();
228 228
229 // Returns the permission with the given |id|, and NULL if it doesn't exist. 229 // Returns the permission with the given |id|, and NULL if it doesn't exist.
230 ExtensionAPIPermission* GetByID(ExtensionAPIPermission::ID id); 230 ExtensionAPIPermission* GetByID(ExtensionAPIPermission::ID id);
231 231
232 // Returns the permission with the given |name|, and NULL if none 232 // Returns the permission with the given |name|, and NULL if none
233 // exists. 233 // exists.
234 ExtensionAPIPermission* GetByName(std::string name); 234 ExtensionAPIPermission* GetByName(const std::string& name);
235 235
236 // Returns a set containing all valid api permission ids. 236 // Returns a set containing all valid api permission ids.
237 ExtensionAPIPermissionSet GetAll(); 237 ExtensionAPIPermissionSet GetAll();
238 238
239 // Converts all the permission names in |permission_names| to permission ids. 239 // Converts all the permission names in |permission_names| to permission ids.
240 ExtensionAPIPermissionSet GetAllByName( 240 ExtensionAPIPermissionSet GetAllByName(
241 const std::set<std::string>& permission_names); 241 const std::set<std::string>& permission_names);
242 242
243 // Gets the total number of API permissions. 243 // Gets the total number of API permissions.
244 size_t get_permission_count() { return permission_count_; } 244 size_t get_permission_count() { return permission_count_; }
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
447 447
448 // The list of hosts this effectively grants access to. 448 // The list of hosts this effectively grants access to.
449 URLPatternSet effective_hosts_; 449 URLPatternSet effective_hosts_;
450 450
451 // A set of oauth2 scopes that are used by the identity API to create OAuth2 451 // A set of oauth2 scopes that are used by the identity API to create OAuth2
452 // tokens for accessing the Google Account of the signed-in sync account. 452 // tokens for accessing the Google Account of the signed-in sync account.
453 ExtensionOAuth2Scopes scopes_; 453 ExtensionOAuth2Scopes scopes_;
454 }; 454 };
455 455
456 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_PERMISSION_SET_H_ 456 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_PERMISSION_SET_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/common/extensions/extension_permission_set.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698