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

Side by Side Diff: content/browser/geolocation/wifi_data_provider_common.h

Issue 1874893002: Convert //content/browser from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 CONTENT_BROWSER_GEOLOCATION_WIFI_DATA_PROVIDER_COMMON_H_ 5 #ifndef CONTENT_BROWSER_GEOLOCATION_WIFI_DATA_PROVIDER_COMMON_H_
6 #define CONTENT_BROWSER_GEOLOCATION_WIFI_DATA_PROVIDER_COMMON_H_ 6 #define CONTENT_BROWSER_GEOLOCATION_WIFI_DATA_PROVIDER_COMMON_H_
7 7
8 #include <assert.h> 8 #include <assert.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
11 #include <memory>
12
11 #include "base/logging.h" 13 #include "base/logging.h"
12 #include "base/macros.h" 14 #include "base/macros.h"
13 #include "base/memory/scoped_ptr.h"
14 #include "base/memory/weak_ptr.h" 15 #include "base/memory/weak_ptr.h"
15 #include "base/strings/string16.h" 16 #include "base/strings/string16.h"
16 #include "content/browser/geolocation/wifi_data_provider.h" 17 #include "content/browser/geolocation/wifi_data_provider.h"
17 #include "content/browser/geolocation/wifi_polling_policy.h" 18 #include "content/browser/geolocation/wifi_polling_policy.h"
18 #include "content/common/content_export.h" 19 #include "content/common/content_export.h"
19 20
20 namespace content { 21 namespace content {
21 22
22 // Converts a MAC address stored as an array of uint8_t to a string. 23 // Converts a MAC address stored as an array of uint8_t to a string.
23 base::string16 MacAddressAsString16(const uint8_t mac_as_int[6]); 24 base::string16 MacAddressAsString16(const uint8_t mac_as_int[6]);
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 61
61 // Will schedule a scan; i.e. enqueue DoWifiScanTask deferred task. 62 // Will schedule a scan; i.e. enqueue DoWifiScanTask deferred task.
62 void ScheduleNextScan(int interval); 63 void ScheduleNextScan(int interval);
63 64
64 WifiData wifi_data_; 65 WifiData wifi_data_;
65 66
66 // Whether we've successfully completed a scan for WiFi data. 67 // Whether we've successfully completed a scan for WiFi data.
67 bool is_first_scan_complete_; 68 bool is_first_scan_complete_;
68 69
69 // Underlying OS wifi API. 70 // Underlying OS wifi API.
70 scoped_ptr<WlanApiInterface> wlan_api_; 71 std::unique_ptr<WlanApiInterface> wlan_api_;
71 72
72 // Controls the polling update interval. 73 // Controls the polling update interval.
73 scoped_ptr<WifiPollingPolicy> polling_policy_; 74 std::unique_ptr<WifiPollingPolicy> polling_policy_;
74 75
75 // Holder for delayed tasks; takes care of cleanup. 76 // Holder for delayed tasks; takes care of cleanup.
76 base::WeakPtrFactory<WifiDataProviderCommon> weak_factory_; 77 base::WeakPtrFactory<WifiDataProviderCommon> weak_factory_;
77 78
78 DISALLOW_COPY_AND_ASSIGN(WifiDataProviderCommon); 79 DISALLOW_COPY_AND_ASSIGN(WifiDataProviderCommon);
79 }; 80 };
80 81
81 } // namespace content 82 } // namespace content
82 83
83 #endif // CONTENT_BROWSER_GEOLOCATION_WIFI_DATA_PROVIDER_COMMON_H_ 84 #endif // CONTENT_BROWSER_GEOLOCATION_WIFI_DATA_PROVIDER_COMMON_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698