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

Side by Side Diff: chrome/browser/geolocation/chrome_access_token_store.cc

Issue 8997008: Move AccessTokenStore to Content API, now that it is a pure-virtual class. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to head (pure merge). Created 9 years 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "chrome/browser/geolocation/chrome_access_token_store.h" 5 #include "chrome/browser/geolocation/chrome_access_token_store.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/string_piece.h" 8 #include "base/string_piece.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "base/values.h" 10 #include "base/values.h"
11 #include "chrome/browser/browser_process.h" 11 #include "chrome/browser/browser_process.h"
12 #include "chrome/browser/prefs/pref_service.h" 12 #include "chrome/browser/prefs/pref_service.h"
13 #include "chrome/browser/prefs/scoped_user_pref_update.h" 13 #include "chrome/browser/prefs/scoped_user_pref_update.h"
14 #include "chrome/common/pref_names.h" 14 #include "chrome/common/pref_names.h"
15 #include "content/public/browser/browser_thread.h" 15 #include "content/public/browser/browser_thread.h"
16 #include "googleurl/src/gurl.h" 16 #include "googleurl/src/gurl.h"
17 17
18 using content::AccessTokenStore;
18 using content::BrowserThread; 19 using content::BrowserThread;
19 20
20 namespace { 21 namespace {
21 22
22 // This was the default location service url for Chrome versions 14 and earlier 23 // This was the default location service url for Chrome versions 14 and earlier
23 // but is no longer supported. 24 // but is no longer supported.
24 const char* kOldDefaultNetworkProviderUrl = "https://www.google.com/loc/json"; 25 const char* kOldDefaultNetworkProviderUrl = "https://www.google.com/loc/json";
25 26
26 // Loads access tokens and other necessary data on the UI thread, and 27 // Loads access tokens and other necessary data on the UI thread, and
27 // calls back to the originator on the originating threaad. 28 // calls back to the originator on the originating threaad.
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 access_token_dictionary->SetWithoutPathExpansion( 106 access_token_dictionary->SetWithoutPathExpansion(
106 server_url.spec(), Value::CreateStringValue(token)); 107 server_url.spec(), Value::CreateStringValue(token));
107 } 108 }
108 109
109 void ChromeAccessTokenStore::SaveAccessToken(const GURL& server_url, 110 void ChromeAccessTokenStore::SaveAccessToken(const GURL& server_url,
110 const string16& access_token) { 111 const string16& access_token) {
111 BrowserThread::PostTask( 112 BrowserThread::PostTask(
112 BrowserThread::UI, FROM_HERE, 113 BrowserThread::UI, FROM_HERE,
113 base::Bind(&SetAccessTokenOnUIThread, server_url, access_token)); 114 base::Bind(&SetAccessTokenOnUIThread, server_url, access_token));
114 } 115 }
OLDNEW
« no previous file with comments | « chrome/browser/geolocation/chrome_access_token_store.h ('k') | content/browser/geolocation/access_token_store.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698