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

Side by Side Diff: chrome/browser/extensions/api/dial/dial_registry.h

Issue 1871713002: Convert //chrome/browser/extensions from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and fix header 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 (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_BROWSER_EXTENSIONS_API_DIAL_DIAL_REGISTRY_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_DIAL_DIAL_REGISTRY_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_DIAL_DIAL_REGISTRY_H_ 6 #define CHROME_BROWSER_EXTENSIONS_API_DIAL_DIAL_REGISTRY_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 protected: 75 protected:
76 // Returns a new instance of the DIAL service. Overridden by tests. 76 // Returns a new instance of the DIAL service. Overridden by tests.
77 virtual DialService* CreateDialService(); 77 virtual DialService* CreateDialService();
78 virtual void ClearDialService(); 78 virtual void ClearDialService();
79 79
80 // Returns the current time. Overridden by tests. 80 // Returns the current time. Overridden by tests.
81 virtual base::Time Now() const; 81 virtual base::Time Now() const;
82 82
83 protected: 83 protected:
84 // The DIAL service. Periodic discovery is active when this is not NULL. 84 // The DIAL service. Periodic discovery is active when this is not NULL.
85 scoped_ptr<DialService> dial_; 85 std::unique_ptr<DialService> dial_;
86 86
87 private: 87 private:
88 typedef base::hash_map<std::string, linked_ptr<DialDeviceData> > 88 typedef base::hash_map<std::string, linked_ptr<DialDeviceData> >
89 DeviceByIdMap; 89 DeviceByIdMap;
90 typedef std::map<std::string, linked_ptr<DialDeviceData> > DeviceByLabelMap; 90 typedef std::map<std::string, linked_ptr<DialDeviceData> > DeviceByLabelMap;
91 91
92 // DialService::Observer: 92 // DialService::Observer:
93 void OnDiscoveryRequest(DialService* service) override; 93 void OnDiscoveryRequest(DialService* service) override;
94 void OnDeviceDiscovered(DialService* service, 94 void OnDeviceDiscovered(DialService* service,
95 const DialDeviceData& device) override; 95 const DialDeviceData& device) override;
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 TestRemovingListenerDoesNotClearList); 184 TestRemovingListenerDoesNotClearList);
185 FRIEND_TEST_ALL_PREFIXES(DialRegistryTest, TestNetworkEventConnectionLost); 185 FRIEND_TEST_ALL_PREFIXES(DialRegistryTest, TestNetworkEventConnectionLost);
186 FRIEND_TEST_ALL_PREFIXES(DialRegistryTest, 186 FRIEND_TEST_ALL_PREFIXES(DialRegistryTest,
187 TestNetworkEventConnectionRestored); 187 TestNetworkEventConnectionRestored);
188 DISALLOW_COPY_AND_ASSIGN(DialRegistry); 188 DISALLOW_COPY_AND_ASSIGN(DialRegistry);
189 }; 189 };
190 190
191 } // namespace extensions 191 } // namespace extensions
192 192
193 #endif // CHROME_BROWSER_EXTENSIONS_API_DIAL_DIAL_REGISTRY_H_ 193 #endif // CHROME_BROWSER_EXTENSIONS_API_DIAL_DIAL_REGISTRY_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/dial/dial_api.cc ('k') | chrome/browser/extensions/api/dial/dial_registry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698