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

Side by Side Diff: content/browser/geolocation/location_arbitrator_impl_unittest.cc

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 #include "content/browser/geolocation/location_arbitrator_impl.h"
6
7 #include <memory>
8
5 #include "base/bind.h" 9 #include "base/bind.h"
6 #include "base/memory/scoped_ptr.h"
7 #include "content/browser/geolocation/fake_access_token_store.h" 10 #include "content/browser/geolocation/fake_access_token_store.h"
8 #include "content/browser/geolocation/location_arbitrator_impl.h"
9 #include "content/browser/geolocation/mock_location_provider.h" 11 #include "content/browser/geolocation/mock_location_provider.h"
10 #include "content/public/common/geoposition.h" 12 #include "content/public/common/geoposition.h"
11 #include "testing/gmock/include/gmock/gmock.h" 13 #include "testing/gmock/include/gmock/gmock.h"
12 #include "testing/gtest/include/gtest/gtest.h" 14 #include "testing/gtest/include/gtest/gtest.h"
13 15
14 using ::testing::NiceMock; 16 using ::testing::NiceMock;
15 17
16 namespace content { 18 namespace content {
17 19
18 class MockLocationObserver { 20 class MockLocationObserver {
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 138
137 MockLocationProvider* cell() { 139 MockLocationProvider* cell() {
138 return arbitrator_->cell_; 140 return arbitrator_->cell_;
139 } 141 }
140 142
141 MockLocationProvider* gps() { 143 MockLocationProvider* gps() {
142 return arbitrator_->gps_; 144 return arbitrator_->gps_;
143 } 145 }
144 146
145 scoped_refptr<FakeAccessTokenStore> access_token_store_; 147 scoped_refptr<FakeAccessTokenStore> access_token_store_;
146 scoped_ptr<MockLocationObserver> observer_; 148 std::unique_ptr<MockLocationObserver> observer_;
147 scoped_ptr<TestingLocationArbitrator> arbitrator_; 149 std::unique_ptr<TestingLocationArbitrator> arbitrator_;
148 base::MessageLoop loop_; 150 base::MessageLoop loop_;
149 }; 151 };
150 152
151 TEST_F(GeolocationLocationArbitratorTest, CreateDestroy) { 153 TEST_F(GeolocationLocationArbitratorTest, CreateDestroy) {
152 EXPECT_TRUE(access_token_store_.get()); 154 EXPECT_TRUE(access_token_store_.get());
153 EXPECT_TRUE(arbitrator_ != NULL); 155 EXPECT_TRUE(arbitrator_ != NULL);
154 arbitrator_.reset(); 156 arbitrator_.reset();
155 SUCCEED(); 157 SUCCEED();
156 } 158 }
157 159
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 320
319 // Update with a less accurate position to verify 240956. 321 // Update with a less accurate position to verify 240956.
320 SetPositionFix(cell(), 3, 139, 150); 322 SetPositionFix(cell(), 3, 139, 150);
321 CheckLastPositionInfo(3, 139, 150); 323 CheckLastPositionInfo(3, 139, 150);
322 324
323 // No delete required for fakeMockProvider. It points to fakeProvider. 325 // No delete required for fakeMockProvider. It points to fakeProvider.
324 delete fakeProvider; 326 delete fakeProvider;
325 } 327 }
326 328
327 } // namespace content 329 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/geolocation/geolocation_service_impl.h ('k') | content/browser/geolocation/network_location_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698