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

Side by Side Diff: content/browser/geolocation/geolocation_service_context.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 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 CONTENT_BROWSER_GEOLOCATION_GEOLOCATION_SERVICE_CONTEXT_H_ 5 #ifndef CONTENT_BROWSER_GEOLOCATION_GEOLOCATION_SERVICE_CONTEXT_H_
6 #define CONTENT_BROWSER_GEOLOCATION_GEOLOCATION_SERVICE_CONTEXT_H_ 6 #define CONTENT_BROWSER_GEOLOCATION_GEOLOCATION_SERVICE_CONTEXT_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/scoped_vector.h" 9 #include "base/memory/scoped_vector.h"
10 #include "content/browser/geolocation/geolocation_service_impl.h" 10 #include "content/browser/geolocation/geolocation_service_impl.h"
(...skipping 24 matching lines...) Expand all
35 // no-op. If a service is added while geolocation is paused, that service 35 // no-op. If a service is added while geolocation is paused, that service
36 // will not get geolocation updates until geolocation is resumed. 36 // will not get geolocation updates until geolocation is resumed.
37 void PauseUpdates(); 37 void PauseUpdates();
38 void ResumeUpdates(); 38 void ResumeUpdates();
39 39
40 // Returns whether geolocation updates are currently paused. 40 // Returns whether geolocation updates are currently paused.
41 bool paused() { return paused_; } 41 bool paused() { return paused_; }
42 42
43 // Enables geolocation override. This method can be used to trigger possible 43 // Enables geolocation override. This method can be used to trigger possible
44 // location-specific behavior in a particular context. 44 // location-specific behavior in a particular context.
45 void SetOverride(scoped_ptr<Geoposition> geoposition); 45 void SetOverride(std::unique_ptr<Geoposition> geoposition);
46 46
47 // Disables geolocation override. 47 // Disables geolocation override.
48 void ClearOverride(); 48 void ClearOverride();
49 49
50 private: 50 private:
51 ScopedVector<GeolocationServiceImpl> services_; 51 ScopedVector<GeolocationServiceImpl> services_;
52 bool paused_; 52 bool paused_;
53 53
54 scoped_ptr<Geoposition> geoposition_override_; 54 std::unique_ptr<Geoposition> geoposition_override_;
55 55
56 DISALLOW_COPY_AND_ASSIGN(GeolocationServiceContext); 56 DISALLOW_COPY_AND_ASSIGN(GeolocationServiceContext);
57 }; 57 };
58 58
59 } // namespace content 59 } // namespace content
60 60
61 #endif // CONTENT_BROWSER_GEOLOCATION_GEOLOCATION_SERVICE_CONTEXT_H_ 61 #endif // CONTENT_BROWSER_GEOLOCATION_GEOLOCATION_SERVICE_CONTEXT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698