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

Unified Diff: device/geolocation/fake_access_token_store.cc

Issue 2192683003: Revert of Reland: Geolocation: move from content/browser to device/ (patchset #2 id:20001 of https:… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2810
Patch Set: 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
« no previous file with comments | « device/geolocation/fake_access_token_store.h ('k') | device/geolocation/geolocation.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/geolocation/fake_access_token_store.cc
diff --git a/device/geolocation/fake_access_token_store.cc b/device/geolocation/fake_access_token_store.cc
deleted file mode 100644
index 1ef436d123cd5a2dc17f32ec0423ed8c3fbe5557..0000000000000000000000000000000000000000
--- a/device/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 "device/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 device {
-
-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 device
« no previous file with comments | « device/geolocation/fake_access_token_store.h ('k') | device/geolocation/geolocation.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698