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

Side by Side Diff: extensions/common/manifest_handlers/externally_connectable.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_MANIFEST_HANDLERS_EXTERNALLY_CONNECTABLE_H_ 5 #ifndef EXTENSIONS_COMMON_MANIFEST_HANDLERS_EXTERNALLY_CONNECTABLE_H_
6 #define EXTENSIONS_COMMON_MANIFEST_HANDLERS_EXTERNALLY_CONNECTABLE_H_ 6 #define EXTENSIONS_COMMON_MANIFEST_HANDLERS_EXTERNALLY_CONNECTABLE_H_
7 7
8 #include <memory>
8 #include <string> 9 #include <string>
9 #include <vector> 10 #include <vector>
10 11
11 #include "base/macros.h" 12 #include "base/macros.h"
12 #include "base/memory/scoped_ptr.h"
13 #include "extensions/common/extension.h" 13 #include "extensions/common/extension.h"
14 #include "extensions/common/install_warning.h" 14 #include "extensions/common/install_warning.h"
15 #include "extensions/common/manifest_handler.h" 15 #include "extensions/common/manifest_handler.h"
16 #include "extensions/common/url_pattern_set.h" 16 #include "extensions/common/url_pattern_set.h"
17 17
18 class GURL; 18 class GURL;
19 19
20 namespace base { 20 namespace base {
21 class Value; 21 class Value;
22 } 22 }
(...skipping 26 matching lines...) Expand all
49 49
50 // The parsed form of the externally_connectable manifest entry. 50 // The parsed form of the externally_connectable manifest entry.
51 struct ExternallyConnectableInfo : public Extension::ManifestData { 51 struct ExternallyConnectableInfo : public Extension::ManifestData {
52 public: 52 public:
53 // Gets the ExternallyConnectableInfo for |extension|, or NULL if none was 53 // Gets the ExternallyConnectableInfo for |extension|, or NULL if none was
54 // specified. 54 // specified.
55 static ExternallyConnectableInfo* Get(const Extension* extension); 55 static ExternallyConnectableInfo* Get(const Extension* extension);
56 56
57 // Tries to construct the info based on |value|, as it would have appeared in 57 // Tries to construct the info based on |value|, as it would have appeared in
58 // the manifest. Sets |error| and returns an empty scoped_ptr on failure. 58 // the manifest. Sets |error| and returns an empty scoped_ptr on failure.
59 static scoped_ptr<ExternallyConnectableInfo> FromValue( 59 static std::unique_ptr<ExternallyConnectableInfo> FromValue(
60 const base::Value& value, 60 const base::Value& value,
61 bool allow_all_urls, 61 bool allow_all_urls,
62 std::vector<InstallWarning>* install_warnings, 62 std::vector<InstallWarning>* install_warnings,
63 base::string16* error); 63 base::string16* error);
64 64
65 ~ExternallyConnectableInfo() override; 65 ~ExternallyConnectableInfo() override;
66 66
67 // The URL patterns that are allowed to connect/sendMessage. 67 // The URL patterns that are allowed to connect/sendMessage.
68 const URLPatternSet matches; 68 const URLPatternSet matches;
69 69
(...skipping 20 matching lines...) Expand all
90 bool all_ids, 90 bool all_ids,
91 bool accepts_tls_channel_id); 91 bool accepts_tls_channel_id);
92 92
93 private: 93 private:
94 DISALLOW_COPY_AND_ASSIGN(ExternallyConnectableInfo); 94 DISALLOW_COPY_AND_ASSIGN(ExternallyConnectableInfo);
95 }; 95 };
96 96
97 } // namespace extensions 97 } // namespace extensions
98 98
99 #endif // EXTENSIONS_COMMON_MANIFEST_HANDLERS_EXTERNALLY_CONNECTABLE_H_ 99 #endif // EXTENSIONS_COMMON_MANIFEST_HANDLERS_EXTERNALLY_CONNECTABLE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698