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

Side by Side Diff: content/browser/geolocation/network_location_request.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_NETWORK_LOCATION_REQUEST_H_ 5 #ifndef CONTENT_BROWSER_GEOLOCATION_NETWORK_LOCATION_REQUEST_H_
6 #define CONTENT_BROWSER_GEOLOCATION_NETWORK_LOCATION_REQUEST_H_ 6 #define CONTENT_BROWSER_GEOLOCATION_NETWORK_LOCATION_REQUEST_H_
7 7
8 #include <memory>
9
8 #include "base/callback.h" 10 #include "base/callback.h"
9 #include "base/macros.h" 11 #include "base/macros.h"
10 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
11 #include "base/memory/scoped_ptr.h"
12 #include "base/strings/string16.h" 13 #include "base/strings/string16.h"
13 #include "content/browser/geolocation/wifi_data_provider.h" 14 #include "content/browser/geolocation/wifi_data_provider.h"
14 #include "content/common/content_export.h" 15 #include "content/common/content_export.h"
15 #include "net/url_request/url_fetcher_delegate.h" 16 #include "net/url_request/url_fetcher_delegate.h"
16 #include "url/gurl.h" 17 #include "url/gurl.h"
17 18
18 namespace net { 19 namespace net {
19 class URLFetcher; 20 class URLFetcher;
20 class URLRequestContextGetter; 21 class URLRequestContextGetter;
21 } 22 }
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 bool is_request_pending() const { return url_fetcher_ != NULL; } 55 bool is_request_pending() const { return url_fetcher_ != NULL; }
55 const GURL& url() const { return url_; } 56 const GURL& url() const { return url_; }
56 57
57 private: 58 private:
58 // net::URLFetcherDelegate 59 // net::URLFetcherDelegate
59 void OnURLFetchComplete(const net::URLFetcher* source) override; 60 void OnURLFetchComplete(const net::URLFetcher* source) override;
60 61
61 scoped_refptr<net::URLRequestContextGetter> url_context_; 62 scoped_refptr<net::URLRequestContextGetter> url_context_;
62 LocationResponseCallback location_response_callback_; 63 LocationResponseCallback location_response_callback_;
63 const GURL url_; 64 const GURL url_;
64 scoped_ptr<net::URLFetcher> url_fetcher_; 65 std::unique_ptr<net::URLFetcher> url_fetcher_;
65 66
66 // Keep a copy of the data sent in the request, so we can refer back to it 67 // Keep a copy of the data sent in the request, so we can refer back to it
67 // when the response arrives. 68 // when the response arrives.
68 WifiData wifi_data_; 69 WifiData wifi_data_;
69 base::Time wifi_timestamp_; 70 base::Time wifi_timestamp_;
70 71
71 // The start time for the request. 72 // The start time for the request.
72 base::TimeTicks request_start_time_; 73 base::TimeTicks request_start_time_;
73 74
74 DISALLOW_COPY_AND_ASSIGN(NetworkLocationRequest); 75 DISALLOW_COPY_AND_ASSIGN(NetworkLocationRequest);
75 }; 76 };
76 77
77 } // namespace content 78 } // namespace content
78 79
79 #endif // CONTENT_BROWSER_GEOLOCATION_NETWORK_LOCATION_REQUEST_H_ 80 #endif // CONTENT_BROWSER_GEOLOCATION_NETWORK_LOCATION_REQUEST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698