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

Unified Diff: content/browser/geolocation/fake_access_token_store.cc

Issue 2192683002: Reland 2:Geolocation: move from content/browser to device/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Ignore size_t_to_int truncation warning Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/geolocation/fake_access_token_store.cc
diff --git a/content/browser/geolocation/fake_access_token_store.cc b/content/browser/geolocation/fake_access_token_store.cc
deleted file mode 100644
index 7b8bc4d9e155abe3faca7fd47a722a46a1f2abda..0000000000000000000000000000000000000000
--- a/content/browser/geolocation/fake_access_token_store.cc
+++ /dev/null
@@ -1,53 +0,0 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "content/browser/geolocation/fake_access_token_store.h"
-
-#include "base/bind.h"
-#include "base/location.h"
-#include "base/logging.h"
-#include "base/threading/thread_task_runner_handle.h"
-
-using testing::_;
-using testing::Invoke;
-
-namespace content {
-
-FakeAccessTokenStore::FakeAccessTokenStore() {
- ON_CALL(*this, LoadAccessTokens(_))
- .WillByDefault(Invoke(this,
- &FakeAccessTokenStore::DefaultLoadAccessTokens));
- ON_CALL(*this, SaveAccessToken(_, _))
- .WillByDefault(Invoke(this,
- &FakeAccessTokenStore::DefaultSaveAccessToken));
-}
-
-void FakeAccessTokenStore::NotifyDelegateTokensLoaded() {
- DCHECK(originating_task_runner_);
- if (!originating_task_runner_->BelongsToCurrentThread()) {
- originating_task_runner_->PostTask(
- FROM_HERE,
- base::Bind(&FakeAccessTokenStore::NotifyDelegateTokensLoaded, this));
- return;
- }
-
- scoped_refptr<net::URLRequestContextGetter> context_getter;
- callback_.Run(access_token_map_, context_getter);
-}
-
-void FakeAccessTokenStore::DefaultLoadAccessTokens(
- const LoadAccessTokensCallback& callback) {
- originating_task_runner_ = base::ThreadTaskRunnerHandle::Get();
- callback_ = callback;
-}
-
-void FakeAccessTokenStore::DefaultSaveAccessToken(
- const GURL& server_url, const base::string16& access_token) {
- DCHECK(server_url.is_valid());
- access_token_map_[server_url] = access_token;
-}
-
-FakeAccessTokenStore::~FakeAccessTokenStore() {}
-
-} // namespace content
« no previous file with comments | « content/browser/geolocation/fake_access_token_store.h ('k') | content/browser/geolocation/geolocation_provider_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698