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

Unified Diff: chrome/browser/geolocation/access_token_store.h

Issue 603040: Add support for top level geolocation arbitrator, and access token persistenc... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 10 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 | « chrome/browser/browser_prefs.cc ('k') | chrome/browser/geolocation/access_token_store.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/geolocation/access_token_store.h
===================================================================
--- chrome/browser/geolocation/access_token_store.h (revision 0)
+++ chrome/browser/geolocation/access_token_store.h (revision 0)
@@ -0,0 +1,33 @@
+// Copyright (c) 2010 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 CHROME_BROWSER_GEOLOCATION_ACCESS_TOKEN_STORE_H_
+#define CHROME_BROWSER_GEOLOCATION_ACCESS_TOKEN_STORE_H_
+
+#include "base/ref_counted.h"
+#include "base/string16.h"
+
+class GURL;
+class PrefService;
+
+// Provides storage for the access token used in the network request.
+// Provided to allow for mocking for testing, by decoupling deep browser
+// dependencies (singleton prefs & threads) from the geolocaiton object.
+class AccessTokenStore : public base::RefCounted<AccessTokenStore> {
+ public:
+ static void RegisterPrefs(PrefService* prefs);
+
+ virtual bool SetAccessToken(const GURL& url,
+ const string16& access_token) = 0;
+ virtual bool GetAccessToken(const GURL& url, string16* access_token) = 0;
+
+ protected:
+ friend class base::RefCounted<AccessTokenStore>;
+ virtual ~AccessTokenStore() {}
+};
+
+// Creates a new access token store backed by the global chome prefs.
+AccessTokenStore* NewChromePrefsAccessTokenStore();
+
+#endif // CHROME_BROWSER_GEOLOCATION_ACCESS_TOKEN_STORE_H_
Property changes on: chrome\browser\geolocation\access_token_store.h
___________________________________________________________________
Added: svn:eol-style
+ LF
« no previous file with comments | « chrome/browser/browser_prefs.cc ('k') | chrome/browser/geolocation/access_token_store.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698