summaryrefslogtreecommitdiffstats
path: root/content/shell/geolocation
diff options
context:
space:
mode:
authorpeter <peter@chromium.org>2014-10-23 16:12:25 -0700
committerCommit bot <commit-bot@chromium.org>2014-10-23 23:12:48 +0000
commit11d5f564c7bc634967edf4b06c801d46cfa399f5 (patch)
tree146c01f3ba4c5dcd67e5435d28e60eaa5732c280 /content/shell/geolocation
parent9d4b477394fa54b89cda588c432da19b193d26a6 (diff)
downloadchromium_src-11d5f564c7bc634967edf4b06c801d46cfa399f5.zip
chromium_src-11d5f564c7bc634967edf4b06c801d46cfa399f5.tar.gz
chromium_src-11d5f564c7bc634967edf4b06c801d46cfa399f5.tar.bz2
Move ShellAccessTokenStore away from //content/shell/geolocation/.
It's odd to have a directory specifically for this, since the other directories in //content/shell/ refer to the process they're in. BUG= Review URL: https://codereview.chromium.org/653573003 Cr-Commit-Position: refs/heads/master@{#300973}
Diffstat (limited to 'content/shell/geolocation')
-rw-r--r--content/shell/geolocation/shell_access_token_store.cc56
-rw-r--r--content/shell/geolocation/shell_access_token_store.h42
2 files changed, 0 insertions, 98 deletions
diff --git a/content/shell/geolocation/shell_access_token_store.cc b/content/shell/geolocation/shell_access_token_store.cc
deleted file mode 100644
index bdcf699..0000000
--- a/content/shell/geolocation/shell_access_token_store.cc
+++ /dev/null
@@ -1,56 +0,0 @@
-// Copyright (c) 2012 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/shell/geolocation/shell_access_token_store.h"
-
-#include "base/bind.h"
-#include "base/message_loop/message_loop.h"
-#include "base/strings/utf_string_conversions.h"
-#include "content/public/browser/browser_thread.h"
-#include "content/shell/browser/shell_browser_context.h"
-
-namespace content {
-
-ShellAccessTokenStore::ShellAccessTokenStore(
- content::ShellBrowserContext* shell_browser_context)
- : shell_browser_context_(shell_browser_context),
- system_request_context_(NULL) {
-}
-
-ShellAccessTokenStore::~ShellAccessTokenStore() {
-}
-
-void ShellAccessTokenStore::LoadAccessTokens(
- const LoadAccessTokensCallbackType& callback) {
- BrowserThread::PostTaskAndReply(
- BrowserThread::UI,
- FROM_HERE,
- base::Bind(&ShellAccessTokenStore::GetRequestContextOnUIThread,
- this,
- shell_browser_context_),
- base::Bind(&ShellAccessTokenStore::RespondOnOriginatingThread,
- this,
- callback));
-}
-
-void ShellAccessTokenStore::GetRequestContextOnUIThread(
- content::ShellBrowserContext* shell_browser_context) {
- system_request_context_ = shell_browser_context->GetRequestContext();
-}
-
-void ShellAccessTokenStore::RespondOnOriginatingThread(
- const LoadAccessTokensCallbackType& callback) {
- // Since content_shell is a test executable, rather than an end user program,
- // we provide a dummy access_token set to avoid hitting the server.
- AccessTokenSet access_token_set;
- access_token_set[GURL()] = base::ASCIIToUTF16("chromium_content_shell");
- callback.Run(access_token_set, system_request_context_.get());
- system_request_context_ = NULL;
-}
-
-void ShellAccessTokenStore::SaveAccessToken(
- const GURL& server_url, const base::string16& access_token) {
-}
-
-} // namespace content
diff --git a/content/shell/geolocation/shell_access_token_store.h b/content/shell/geolocation/shell_access_token_store.h
deleted file mode 100644
index df46146..0000000
--- a/content/shell/geolocation/shell_access_token_store.h
+++ /dev/null
@@ -1,42 +0,0 @@
-// Copyright (c) 2012 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.
-
-#ifndef CONTENT_SHELL_GEOLOCATION_SHELL_ACCESS_TOKEN_STORE_H_
-#define CONTENT_SHELL_GEOLOCATION_SHELL_ACCESS_TOKEN_STORE_H_
-
-#include "base/memory/ref_counted.h"
-#include "content/public/browser/access_token_store.h"
-#include "net/url_request/url_request_context_getter.h"
-
-namespace content {
-class ShellBrowserContext;
-
-// Dummy access token store used to initialise the network location provider.
-class ShellAccessTokenStore : public content::AccessTokenStore {
- public:
- explicit ShellAccessTokenStore(
- content::ShellBrowserContext* shell_browser_context);
-
- private:
- ~ShellAccessTokenStore() override;
-
- void GetRequestContextOnUIThread(
- content::ShellBrowserContext* shell_browser_context);
- void RespondOnOriginatingThread(const LoadAccessTokensCallbackType& callback);
-
- // AccessTokenStore
- void LoadAccessTokens(const LoadAccessTokensCallbackType& callback) override;
-
- void SaveAccessToken(const GURL& server_url,
- const base::string16& access_token) override;
-
- content::ShellBrowserContext* shell_browser_context_;
- scoped_refptr<net::URLRequestContextGetter> system_request_context_;
-
- DISALLOW_COPY_AND_ASSIGN(ShellAccessTokenStore);
-};
-
-} // namespace content
-
-#endif // CONTENT_SHELL_GEOLOCATION_SHELL_ACCESS_TOKEN_STORE_H_