OLD | NEW |
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/bind.h" | 5 #include "base/bind.h" |
6 #include "base/bind_helpers.h" | 6 #include "base/bind_helpers.h" |
7 #include "base/memory/ref_counted.h" | 7 #include "base/memory/ref_counted.h" |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
10 #include "base/string16.h" | 10 #include "base/strings/string16.h" |
11 #include "base/time.h" | 11 #include "base/time.h" |
12 #include "content/browser/geolocation/geolocation_provider_impl.h" | 12 #include "content/browser/geolocation/geolocation_provider_impl.h" |
13 #include "content/browser/geolocation/location_provider.h" | 13 #include "content/browser/geolocation/location_provider.h" |
14 #include "content/browser/geolocation/mock_location_arbitrator.h" | 14 #include "content/browser/geolocation/mock_location_arbitrator.h" |
15 #include "content/public/browser/access_token_store.h" | 15 #include "content/public/browser/access_token_store.h" |
16 #include "content/public/browser/browser_thread.h" | 16 #include "content/public/browser/browser_thread.h" |
17 #include "content/public/test/test_browser_thread.h" | 17 #include "content/public/test/test_browser_thread.h" |
18 #include "googleurl/src/gurl.h" | 18 #include "googleurl/src/gurl.h" |
19 #include "testing/gmock/include/gmock/gmock.h" | 19 #include "testing/gmock/include/gmock/gmock.h" |
20 #include "testing/gtest/include/gtest/gtest.h" | 20 #include "testing/gtest/include/gtest/gtest.h" |
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
242 GeolocationProviderImpl::LocationUpdateCallback callback = base::Bind( | 242 GeolocationProviderImpl::LocationUpdateCallback callback = base::Bind( |
243 &MockGeolocationObserver::OnLocationUpdate, | 243 &MockGeolocationObserver::OnLocationUpdate, |
244 base::Unretained(&mock_observer)); | 244 base::Unretained(&mock_observer)); |
245 provider()->AddLocationUpdateCallback(callback, false); | 245 provider()->AddLocationUpdateCallback(callback, false); |
246 provider()->RemoveLocationUpdateCallback(callback); | 246 provider()->RemoveLocationUpdateCallback(callback); |
247 // Wait for the providers to be stopped now that all clients are gone. | 247 // Wait for the providers to be stopped now that all clients are gone. |
248 EXPECT_FALSE(ProvidersStarted()); | 248 EXPECT_FALSE(ProvidersStarted()); |
249 } | 249 } |
250 | 250 |
251 } // namespace content | 251 } // namespace content |
OLD | NEW |