| OLD | NEW | 
|---|
| 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 "content/browser/geolocation/fake_access_token_store.h" | 5 #include "content/browser/geolocation/fake_access_token_store.h" | 
| 6 | 6 | 
| 7 #include "base/bind.h" | 7 #include "base/bind.h" | 
| 8 #include "base/location.h" | 8 #include "base/location.h" | 
| 9 #include "base/logging.h" | 9 #include "base/logging.h" | 
| 10 #include "base/message_loop/message_loop_proxy.h" | 10 #include "base/message_loop/message_loop_proxy.h" | 
| (...skipping 22 matching lines...) Expand all  Loading... | 
| 33         base::Bind(&FakeAccessTokenStore::NotifyDelegateTokensLoaded, this)); | 33         base::Bind(&FakeAccessTokenStore::NotifyDelegateTokensLoaded, this)); | 
| 34     return; | 34     return; | 
| 35   } | 35   } | 
| 36 | 36 | 
| 37   net::URLRequestContextGetter* context_getter = NULL; | 37   net::URLRequestContextGetter* context_getter = NULL; | 
| 38   callback_.Run(access_token_set_, context_getter); | 38   callback_.Run(access_token_set_, context_getter); | 
| 39 } | 39 } | 
| 40 | 40 | 
| 41 void FakeAccessTokenStore::DefaultLoadAccessTokens( | 41 void FakeAccessTokenStore::DefaultLoadAccessTokens( | 
| 42     const LoadAccessTokensCallbackType& callback) { | 42     const LoadAccessTokensCallbackType& callback) { | 
| 43   originating_message_loop_ = MessageLoopProxy::current(); | 43   originating_message_loop_ = MessageLoopProxy::current().get(); | 
| 44   callback_ = callback; | 44   callback_ = callback; | 
| 45 } | 45 } | 
| 46 | 46 | 
| 47 void FakeAccessTokenStore::DefaultSaveAccessToken( | 47 void FakeAccessTokenStore::DefaultSaveAccessToken( | 
| 48     const GURL& server_url, const string16& access_token) { | 48     const GURL& server_url, const string16& access_token) { | 
| 49   DCHECK(server_url.is_valid()); | 49   DCHECK(server_url.is_valid()); | 
| 50   access_token_set_[server_url] = access_token; | 50   access_token_set_[server_url] = access_token; | 
| 51 } | 51 } | 
| 52 | 52 | 
| 53 FakeAccessTokenStore::~FakeAccessTokenStore() {} | 53 FakeAccessTokenStore::~FakeAccessTokenStore() {} | 
| 54 | 54 | 
| 55 }  // namespace content | 55 }  // namespace content | 
| OLD | NEW | 
|---|