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

Side by Side Diff: extensions/common/api/declarative/declarative_manifest_data.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_API_DECLARATIVE_DECLARATIVE_MANIFEST_DATA_H_ 5 #ifndef EXTENSIONS_COMMON_API_DECLARATIVE_DECLARATIVE_MANIFEST_DATA_H_
6 #define EXTENSIONS_COMMON_API_DECLARATIVE_DECLARATIVE_MANIFEST_DATA_H_ 6 #define EXTENSIONS_COMMON_API_DECLARATIVE_DECLARATIVE_MANIFEST_DATA_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 12 matching lines...) Expand all
23 23
24 DeclarativeManifestData(); 24 DeclarativeManifestData();
25 ~DeclarativeManifestData() override; 25 ~DeclarativeManifestData() override;
26 26
27 // Gets the DeclarativeManifestData for |extension|, or NULL if none was 27 // Gets the DeclarativeManifestData for |extension|, or NULL if none was
28 // specified. 28 // specified.
29 static DeclarativeManifestData* Get(const Extension* extension); 29 static DeclarativeManifestData* Get(const Extension* extension);
30 30
31 // Tries to construct the info based on |value|, as it would have appeared in 31 // Tries to construct the info based on |value|, as it would have appeared in
32 // the manifest. Sets |error| and returns an empty scoped_ptr on failure. 32 // the manifest. Sets |error| and returns an empty scoped_ptr on failure.
33 static scoped_ptr<DeclarativeManifestData> FromValue(const base::Value& value, 33 static std::unique_ptr<DeclarativeManifestData> FromValue(
34 base::string16* error); 34 const base::Value& value,
35 base::string16* error);
35 36
36 std::vector<linked_ptr<DeclarativeManifestData::Rule>>& RulesForEvent( 37 std::vector<linked_ptr<DeclarativeManifestData::Rule>>& RulesForEvent(
37 const std::string& event); 38 const std::string& event);
38 39
39 private: 40 private:
40 std::map<std::string, std::vector<linked_ptr<Rule>>> event_rules_map_; 41 std::map<std::string, std::vector<linked_ptr<Rule>>> event_rules_map_;
41 DISALLOW_COPY_AND_ASSIGN(DeclarativeManifestData); 42 DISALLOW_COPY_AND_ASSIGN(DeclarativeManifestData);
42 }; 43 };
43 44
44 } // namespace extensions 45 } // namespace extensions
45 46
46 #endif // EXTENSIONS_COMMON_API_DECLARATIVE_DECLARATIVE_MANIFEST_DATA_H_ 47 #endif // EXTENSIONS_COMMON_API_DECLARATIVE_DECLARATIVE_MANIFEST_DATA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698