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

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

Issue 11412194: Cleanup: MockGeolocationArbitrator for GeolocationProvider tests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Make suggested changes. Created 8 years 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
« no previous file with comments | « no previous file | content/browser/geolocation/geolocation_provider_unittest.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) 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/geolocation_provider.h" 5 #include "content/browser/geolocation/geolocation_provider.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/location.h" 10 #include "base/location.h"
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "base/memory/singleton.h" 12 #include "base/memory/singleton.h"
13 #include "base/message_loop.h" 13 #include "base/message_loop.h"
14 #include "content/browser/geolocation/location_arbitrator.h" 14 #include "content/browser/geolocation/location_arbitrator_impl.h"
15 #include "content/public/browser/browser_thread.h" 15 #include "content/public/browser/browser_thread.h"
16 16
17 namespace content { 17 namespace content {
18 18
19 void GeolocationProvider::AddObserver(GeolocationObserver* observer, 19 void GeolocationProvider::AddObserver(GeolocationObserver* observer,
20 const GeolocationObserverOptions& update_options) { 20 const GeolocationObserverOptions& update_options) {
21 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 21 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
22 observers_[observer] = update_options; 22 observers_[observer] = update_options;
23 OnClientsChanged(); 23 OnClientsChanged();
24 if (position_.Validate() || 24 if (position_.Validate() ||
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 arbitrator_ = CreateArbitrator(); 186 arbitrator_ = CreateArbitrator();
187 } 187 }
188 188
189 void GeolocationProvider::CleanUp() { 189 void GeolocationProvider::CleanUp() {
190 DCHECK(OnGeolocationThread()); 190 DCHECK(OnGeolocationThread());
191 delete arbitrator_; 191 delete arbitrator_;
192 arbitrator_ = NULL; 192 arbitrator_ = NULL;
193 } 193 }
194 194
195 GeolocationArbitrator* GeolocationProvider::CreateArbitrator() { 195 GeolocationArbitrator* GeolocationProvider::CreateArbitrator() {
196 return new GeolocationArbitrator(this); 196 return new GeolocationArbitratorImpl(this);
197 } 197 }
198 198
199 } // namespace content 199 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/geolocation/geolocation_provider_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698