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

Side by Side Diff: extensions/common/permissions/api_permission.h

Issue 1908953003: Convert //extensions/{common,shell} from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase? 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 EXTENSIONS_COMMON_PERMISSIONS_API_PERMISSION_H_ 5 #ifndef EXTENSIONS_COMMON_PERMISSIONS_API_PERMISSION_H_
6 #define EXTENSIONS_COMMON_PERMISSIONS_API_PERMISSION_H_ 6 #define EXTENSIONS_COMMON_PERMISSIONS_API_PERMISSION_H_
7 7
8 #include <memory>
8 #include <set> 9 #include <set>
9 #include <string> 10 #include <string>
10 #include <vector> 11 #include <vector>
11 12
12 #include "base/callback.h" 13 #include "base/callback.h"
13 #include "base/memory/scoped_ptr.h"
14 #include "base/pickle.h" 14 #include "base/pickle.h"
15 #include "base/values.h" 15 #include "base/values.h"
16 16
17 namespace IPC { 17 namespace IPC {
18 class Message; 18 class Message;
19 } 19 }
20 20
21 namespace extensions { 21 namespace extensions {
22 22
23 class PermissionIDSet; 23 class PermissionIDSet;
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 // Parses the APIPermission from |value|. Returns false if an error happens 301 // Parses the APIPermission from |value|. Returns false if an error happens
302 // and optionally set |error| if |error| is not NULL. If |value| represents 302 // and optionally set |error| if |error| is not NULL. If |value| represents
303 // multiple permissions, some are invalid, and |unhandled_permissions| is 303 // multiple permissions, some are invalid, and |unhandled_permissions| is
304 // not NULL, the invalid ones are put into |unhandled_permissions| and the 304 // not NULL, the invalid ones are put into |unhandled_permissions| and the
305 // function returns true. 305 // function returns true.
306 virtual bool FromValue(const base::Value* value, 306 virtual bool FromValue(const base::Value* value,
307 std::string* error, 307 std::string* error,
308 std::vector<std::string>* unhandled_permissions) = 0; 308 std::vector<std::string>* unhandled_permissions) = 0;
309 309
310 // Stores this into a new created |value|. 310 // Stores this into a new created |value|.
311 virtual scoped_ptr<base::Value> ToValue() const = 0; 311 virtual std::unique_ptr<base::Value> ToValue() const = 0;
312 312
313 // Clones this. 313 // Clones this.
314 virtual APIPermission* Clone() const = 0; 314 virtual APIPermission* Clone() const = 0;
315 315
316 // Returns a new API permission which equals this - |rhs|. 316 // Returns a new API permission which equals this - |rhs|.
317 virtual APIPermission* Diff(const APIPermission* rhs) const = 0; 317 virtual APIPermission* Diff(const APIPermission* rhs) const = 0;
318 318
319 // Returns a new API permission which equals the union of this and |rhs|. 319 // Returns a new API permission which equals the union of this and |rhs|.
320 virtual APIPermission* Union(const APIPermission* rhs) const = 0; 320 virtual APIPermission* Union(const APIPermission* rhs) const = 0;
321 321
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
430 430
431 const APIPermission::ID id_; 431 const APIPermission::ID id_;
432 const char* const name_; 432 const char* const name_;
433 const int flags_; 433 const int flags_;
434 const APIPermissionConstructor api_permission_constructor_; 434 const APIPermissionConstructor api_permission_constructor_;
435 }; 435 };
436 436
437 } // namespace extensions 437 } // namespace extensions
438 438
439 #endif // EXTENSIONS_COMMON_PERMISSIONS_API_PERMISSION_H_ 439 #endif // EXTENSIONS_COMMON_PERMISSIONS_API_PERMISSION_H_
OLDNEW
« no previous file with comments | « extensions/common/message_bundle_unittest.cc ('k') | extensions/common/permissions/api_permission.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698