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

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

Issue 1992005: Update dynamic annotations and move them to base/third_party (Closed)
Patch Set: rebased Created 10 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
« no previous file with comments | « build/common.gypi ('k') | chrome/browser/sync/engine/syncer_thread.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "chrome/browser/geolocation/wifi_data_provider_common.h" 5 #include "chrome/browser/geolocation/wifi_data_provider_common.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/dynamic_annotations.h"
10 #include "base/scoped_ptr.h" 9 #include "base/scoped_ptr.h"
11 #include "base/string_util.h" 10 #include "base/string_util.h"
11 #include "base/third_party/dynamic_annotations/dynamic_annotations.h"
12 #include "testing/gtest/include/gtest/gtest.h" 12 #include "testing/gtest/include/gtest/gtest.h"
13 13
14 class MockWlanApi : public WifiDataProviderCommon::WlanApiInterface { 14 class MockWlanApi : public WifiDataProviderCommon::WlanApiInterface {
15 public: 15 public:
16 MockWlanApi() : calls_(0), bool_return_(true) { 16 MockWlanApi() : calls_(0), bool_return_(true) {
17 ANNOTATE_BENIGN_RACE(&calls_, "This is a test-only data race on a counter"); 17 ANNOTATE_BENIGN_RACE(&calls_, "This is a test-only data race on a counter");
18 } 18 }
19 virtual bool GetAccessPointData(WifiData::AccessPointDataSet* data) { 19 virtual bool GetAccessPointData(WifiData::AccessPointDataSet* data) {
20 ++calls_; 20 ++calls_;
21 *data = data_out_; 21 *data = data_out_;
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 138
139 TEST_F(GeolocationWifiDataProviderCommonTest, 139 TEST_F(GeolocationWifiDataProviderCommonTest,
140 StartThreadViaDeviceDataProvider) { 140 StartThreadViaDeviceDataProvider) {
141 MessageLoopQuitListener quit_listener(&main_message_loop_); 141 MessageLoopQuitListener quit_listener(&main_message_loop_);
142 WifiDataProvider::SetFactory(CreateWifiDataProviderCommonWithMock); 142 WifiDataProvider::SetFactory(CreateWifiDataProviderCommonWithMock);
143 DeviceDataProvider<WifiData>::Register(&quit_listener); 143 DeviceDataProvider<WifiData>::Register(&quit_listener);
144 main_message_loop_.Run(); 144 main_message_loop_.Run();
145 DeviceDataProvider<WifiData>::Unregister(&quit_listener); 145 DeviceDataProvider<WifiData>::Unregister(&quit_listener);
146 DeviceDataProvider<WifiData>::ResetFactory(); 146 DeviceDataProvider<WifiData>::ResetFactory();
147 } 147 }
OLDNEW
« no previous file with comments | « build/common.gypi ('k') | chrome/browser/sync/engine/syncer_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698