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

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

Issue 10068037: RefCounted types should not have public destructors, content/browser part 1 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: MSVC fixes Created 8 years, 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 <vector> 5 #include <vector>
6 6
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "base/string_util.h" 8 #include "base/string_util.h"
9 #include "base/third_party/dynamic_annotations/dynamic_annotations.h" 9 #include "base/third_party/dynamic_annotations/dynamic_annotations.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 return new_wlan_api_.release(); 90 return new_wlan_api_.release();
91 } 91 }
92 virtual PollingPolicyInterface* NewPollingPolicy() { 92 virtual PollingPolicyInterface* NewPollingPolicy() {
93 CHECK(new_polling_policy_ != NULL); 93 CHECK(new_polling_policy_ != NULL);
94 return new_polling_policy_.release(); 94 return new_polling_policy_.release();
95 } 95 }
96 96
97 scoped_ptr<MockWlanApi> new_wlan_api_; 97 scoped_ptr<MockWlanApi> new_wlan_api_;
98 scoped_ptr<MockPollingPolicy> new_polling_policy_; 98 scoped_ptr<MockPollingPolicy> new_polling_policy_;
99 99
100 private:
101 virtual ~WifiDataProviderCommonWithMock() {}
102
100 DISALLOW_COPY_AND_ASSIGN(WifiDataProviderCommonWithMock); 103 DISALLOW_COPY_AND_ASSIGN(WifiDataProviderCommonWithMock);
101 }; 104 };
102 105
103 WifiDataProviderImplBase* CreateWifiDataProviderCommonWithMock() { 106 WifiDataProviderImplBase* CreateWifiDataProviderCommonWithMock() {
104 return new WifiDataProviderCommonWithMock; 107 return new WifiDataProviderCommonWithMock;
105 } 108 }
106 109
107 // Main test fixture 110 // Main test fixture
108 class GeolocationWifiDataProviderCommonTest : public testing::Test { 111 class GeolocationWifiDataProviderCommonTest : public testing::Test {
109 public: 112 public:
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 MessageLoopQuitListener quit_listener(&main_message_loop_); 225 MessageLoopQuitListener quit_listener(&main_message_loop_);
223 WifiDataProvider::SetFactory(CreateWifiDataProviderCommonWithMock); 226 WifiDataProvider::SetFactory(CreateWifiDataProviderCommonWithMock);
224 DeviceDataProvider<WifiData>::Register(&quit_listener); 227 DeviceDataProvider<WifiData>::Register(&quit_listener);
225 main_message_loop_.Run(); 228 main_message_loop_.Run();
226 DeviceDataProvider<WifiData>::Unregister(&quit_listener); 229 DeviceDataProvider<WifiData>::Unregister(&quit_listener);
227 DeviceDataProvider<WifiData>::ResetFactory(); 230 DeviceDataProvider<WifiData>::ResetFactory();
228 } 231 }
229 232
230 } // namespace 233 } // namespace
231 234
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698