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

Side by Side Diff: components/wifi/wifi_service.h

Issue 1917673002: Convert //components/[u-z]* from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 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
« no previous file with comments | « components/wifi/network_properties.cc ('k') | components/wifi/wifi_service_mac.mm » ('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 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 COMPONENTS_WIFI_WIFI_SERVICE_H_ 5 #ifndef COMPONENTS_WIFI_WIFI_SERVICE_H_
6 #define COMPONENTS_WIFI_WIFI_SERVICE_H_ 6 #define COMPONENTS_WIFI_WIFI_SERVICE_H_
7 7
8 #include <list> 8 #include <list>
9 #include <memory>
9 #include <set> 10 #include <set>
10 #include <string> 11 #include <string>
11 #include <vector> 12 #include <vector>
12 13
13 #include "base/callback.h" 14 #include "base/callback.h"
14 #include "base/macros.h" 15 #include "base/macros.h"
15 #include "base/memory/ref_counted.h" 16 #include "base/memory/ref_counted.h"
16 #include "base/memory/scoped_ptr.h"
17 #include "base/threading/sequenced_worker_pool.h" 17 #include "base/threading/sequenced_worker_pool.h"
18 #include "base/values.h" 18 #include "base/values.h"
19 #include "components/wifi/wifi_export.h" 19 #include "components/wifi/wifi_export.h"
20 20
21 namespace wifi { 21 namespace wifi {
22 22
23 // WiFiService interface used by implementation of chrome.networkingPrivate 23 // WiFiService interface used by implementation of chrome.networkingPrivate
24 // JavaScript extension API. All methods should be called on worker thread. 24 // JavaScript extension API. All methods should be called on worker thread.
25 // It could be created on any (including UI) thread, so nothing expensive should 25 // It could be created on any (including UI) thread, so nothing expensive should
26 // be done in the constructor. See |NetworkingPrivateService| for wrapper 26 // be done in the constructor. See |NetworkingPrivateService| for wrapper
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 // which requires a round trip to query the networking subsystem. It only 62 // which requires a round trip to query the networking subsystem. It only
63 // returns a subset of the properties returned by |GetProperties|. Populates 63 // returns a subset of the properties returned by |GetProperties|. Populates
64 // |properties| on success, |error| on failure. 64 // |properties| on success, |error| on failure.
65 virtual void GetState(const std::string& network_guid, 65 virtual void GetState(const std::string& network_guid,
66 base::DictionaryValue* properties, 66 base::DictionaryValue* properties,
67 std::string* error) = 0; 67 std::string* error) = 0;
68 68
69 // Set Properties of network identified by |network_guid|. Populates |error| 69 // Set Properties of network identified by |network_guid|. Populates |error|
70 // on failure. 70 // on failure.
71 virtual void SetProperties(const std::string& network_guid, 71 virtual void SetProperties(const std::string& network_guid,
72 scoped_ptr<base::DictionaryValue> properties, 72 std::unique_ptr<base::DictionaryValue> properties,
73 std::string* error) = 0; 73 std::string* error) = 0;
74 74
75 // Creates a new network configuration from |properties|. If |shared| is true, 75 // Creates a new network configuration from |properties|. If |shared| is true,
76 // share this network configuration with other users. If a matching configured 76 // share this network configuration with other users. If a matching configured
77 // network already exists, this will fail and populate |error|. On success 77 // network already exists, this will fail and populate |error|. On success
78 // populates the |network_guid| of the new network. 78 // populates the |network_guid| of the new network.
79 virtual void CreateNetwork(bool shared, 79 virtual void CreateNetwork(bool shared,
80 scoped_ptr<base::DictionaryValue> properties, 80 std::unique_ptr<base::DictionaryValue> properties,
81 std::string* network_guid, 81 std::string* network_guid,
82 std::string* error) = 0; 82 std::string* error) = 0;
83 83
84 // Get list of visible networks of |network_type| (one of onc::network_type). 84 // Get list of visible networks of |network_type| (one of onc::network_type).
85 // Populates |network_list| on success. 85 // Populates |network_list| on success.
86 virtual void GetVisibleNetworks(const std::string& network_type, 86 virtual void GetVisibleNetworks(const std::string& network_type,
87 base::ListValue* network_list, 87 base::ListValue* network_list,
88 bool include_details) = 0; 88 bool include_details) = 0;
89 89
90 // Request network scan. Send |NetworkListChanged| event on completion. 90 // Request network scan. Send |NetworkListChanged| event on completion.
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 static const char kErrorScanForNetworksWithName[]; 136 static const char kErrorScanForNetworksWithName[];
137 static const char kErrorWiFiService[]; 137 static const char kErrorWiFiService[];
138 138
139 private: 139 private:
140 DISALLOW_COPY_AND_ASSIGN(WiFiService); 140 DISALLOW_COPY_AND_ASSIGN(WiFiService);
141 }; 141 };
142 142
143 } // namespace wifi 143 } // namespace wifi
144 144
145 #endif // COMPONENTS_WIFI_WIFI_SERVICE_H_ 145 #endif // COMPONENTS_WIFI_WIFI_SERVICE_H_
OLDNEW
« no previous file with comments | « components/wifi/network_properties.cc ('k') | components/wifi/wifi_service_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698