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

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

Issue 22866005: Remove threading from WifiDataProviderCommon. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 7 years, 4 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 "base/json/json_reader.h" 5 #include "base/json/json_reader.h"
6 #include "base/json/json_writer.h" 6 #include "base/json/json_writer.h"
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "base/strings/string_number_conversions.h" 8 #include "base/strings/string_number_conversions.h"
9 #include "base/strings/string_util.h" 9 #include "base/strings/string_util.h"
10 #include "base/strings/stringprintf.h" 10 #include "base/strings/stringprintf.h"
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 stop_calls_(0), 69 stop_calls_(0),
70 got_data_(true) { 70 got_data_(true) {
71 } 71 }
72 72
73 virtual ~MockDeviceDataProviderImpl() { 73 virtual ~MockDeviceDataProviderImpl() {
74 CHECK(this == instance_); 74 CHECK(this == instance_);
75 instance_ = NULL; 75 instance_ = NULL;
76 } 76 }
77 77
78 // DeviceDataProviderImplBase implementation. 78 // DeviceDataProviderImplBase implementation.
79 virtual bool StartDataProvider() { 79 virtual void StartDataProvider() {
80 ++start_calls_; 80 ++start_calls_;
81 return true;
82 } 81 }
83 virtual void StopDataProvider() { 82 virtual void StopDataProvider() {
84 ++stop_calls_; 83 ++stop_calls_;
85 } 84 }
86 virtual bool GetData(DataType* data_out) { 85 virtual bool GetData(DataType* data_out) {
87 CHECK(data_out); 86 CHECK(data_out);
88 *data_out = data_; 87 *data_out = data_;
89 return got_data_; 88 return got_data_;
90 } 89 }
91 90
(...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after
560 EXPECT_TRUE(cache.FindPosition(CreateReferenceWifiScanData(1))); 559 EXPECT_TRUE(cache.FindPosition(CreateReferenceWifiScanData(1)));
561 } else { 560 } else {
562 const int evicted = i - kCacheSize; 561 const int evicted = i - kCacheSize;
563 EXPECT_FALSE(cache.FindPosition(CreateReferenceWifiScanData(evicted))); 562 EXPECT_FALSE(cache.FindPosition(CreateReferenceWifiScanData(evicted)));
564 EXPECT_TRUE(cache.FindPosition(CreateReferenceWifiScanData(evicted + 1))); 563 EXPECT_TRUE(cache.FindPosition(CreateReferenceWifiScanData(evicted + 1)));
565 } 564 }
566 } 565 }
567 } 566 }
568 567
569 } // namespace content 568 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/geolocation/empty_device_data_provider.h ('k') | content/browser/geolocation/wifi_data_provider_chromeos.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698