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

Unified Diff: chromecast/shell/browser/geolocation/cast_access_token_store.cc

Issue 638803002: Reorganizes Chromecast code to better reflect functional dependencies. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: extra DEPS: chromecast/crash/android --> chromecast/common Created 6 years, 2 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
Index: chromecast/shell/browser/geolocation/cast_access_token_store.cc
diff --git a/chromecast/shell/browser/geolocation/cast_access_token_store.cc b/chromecast/shell/browser/geolocation/cast_access_token_store.cc
deleted file mode 100644
index cae51df64177d48f7a6986ce48e028e092bc48c8..0000000000000000000000000000000000000000
--- a/chromecast/shell/browser/geolocation/cast_access_token_store.cc
+++ /dev/null
@@ -1,51 +0,0 @@
-// Copyright 2014 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 "chromecast/shell/browser/geolocation/cast_access_token_store.h"
-
-#include "base/callback_helpers.h"
-#include "chromecast/shell/browser/cast_browser_context.h"
-#include "chromecast/shell/browser/cast_content_browser_client.h"
-#include "content/public/browser/browser_thread.h"
-#include "content/public/common/content_client.h"
-
-namespace chromecast {
-namespace shell {
-
-CastAccessTokenStore::CastAccessTokenStore(
- content::BrowserContext* browser_context)
- : browser_context_(browser_context) {
-}
-
-CastAccessTokenStore::~CastAccessTokenStore() {
-}
-
-void CastAccessTokenStore::GetRequestContextGetterOnUIThread() {
- request_context_ = browser_context_->GetRequestContext();
-}
-
-void CastAccessTokenStore::RespondOnOriginatingThread() {
- base::ResetAndReturn(&callback_).Run(access_token_set_, request_context_);
-}
-
-void CastAccessTokenStore::LoadAccessTokens(
- const LoadAccessTokensCallbackType& callback) {
- callback_ = callback;
- content::BrowserThread::PostTaskAndReply(
- content::BrowserThread::UI,
- FROM_HERE,
- base::Bind(&CastAccessTokenStore::GetRequestContextGetterOnUIThread,
- this),
- base::Bind(&CastAccessTokenStore::RespondOnOriginatingThread, this));
-}
-
-void CastAccessTokenStore::SaveAccessToken(
- const GURL& server_url, const base::string16& access_token) {
- if (access_token_set_[server_url] != access_token) {
- access_token_set_[server_url] = access_token;
- }
-}
-
-} // namespace shell
-} // namespace chromecast
« no previous file with comments | « chromecast/shell/browser/geolocation/cast_access_token_store.h ('k') | chromecast/shell/browser/resources/resource_ids » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698