Loosen up heuristics for detecting account creation forms.
[chromium-blink-merge.git] / content / shell / geolocation / shell_access_token_store.cc
blob587057c89ec9986cfd95df8b6d18352cffff5551
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
3 // found in the LICENSE file.
5 #include "content/shell/geolocation/shell_access_token_store.h"
7 #include "base/bind.h"
8 #include "base/message_loop.h"
9 #include "base/utf_string_conversions.h"
11 ShellAccessTokenStore::ShellAccessTokenStore(
12 net::URLRequestContextGetter* request_context)
13 : request_context_(request_context) {
16 ShellAccessTokenStore::~ShellAccessTokenStore() {
19 void ShellAccessTokenStore::LoadAccessTokens(
20 const LoadAccessTokensCallbackType& callback) {
21 MessageLoop::current()->PostTask(
22 FROM_HERE,
23 base::Bind(&ShellAccessTokenStore::DidLoadAccessTokens,
24 request_context_, callback));
27 void ShellAccessTokenStore::DidLoadAccessTokens(
28 net::URLRequestContextGetter* request_context,
29 const LoadAccessTokensCallbackType& callback) {
30 // Since content_shell is a test executable, rather than an end user program,
31 // we provide a dummy access_token set to avoid hitting the server.
32 AccessTokenSet access_token_set;
33 access_token_set[GURL()] = ASCIIToUTF16("chromium_content_shell");
34 callback.Run(access_token_set, request_context);
37 void ShellAccessTokenStore::SaveAccessToken(
38 const GURL& server_url, const string16& access_token) {