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

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

Issue 16296002: Update chrome/ to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 6 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 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 "base/bind.h" 5 #include "base/bind.h"
6 #include "base/bind_helpers.h" 6 #include "base/bind_helpers.h"
7 #include "base/string_util.h" 7 #include "base/string_util.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "chrome/browser/geolocation/chrome_access_token_store.h" 9 #include "chrome/browser/geolocation/chrome_access_token_store.h"
10 #include "chrome/test/base/in_process_browser_test.h" 10 #include "chrome/test/base/in_process_browser_test.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 scoped_refptr<AccessTokenStore> token_store_; 42 scoped_refptr<AccessTokenStore> token_store_;
43 GURL ref_url_; 43 GURL ref_url_;
44 const string16* token_to_expect_; 44 const string16* token_to_expect_;
45 const string16* token_to_set_; 45 const string16* token_to_set_;
46 }; 46 };
47 47
48 void StartTestStepFromClientThread( 48 void StartTestStepFromClientThread(
49 scoped_refptr<AccessTokenStore>* store, 49 scoped_refptr<AccessTokenStore>* store,
50 const AccessTokenStore::LoadAccessTokensCallbackType& callback) { 50 const AccessTokenStore::LoadAccessTokensCallbackType& callback) {
51 ASSERT_TRUE(BrowserThread::CurrentlyOn(kExpectedClientThreadId)); 51 ASSERT_TRUE(BrowserThread::CurrentlyOn(kExpectedClientThreadId));
52 if (*store == NULL) 52 if (store->get() == NULL)
53 (*store) = new ChromeAccessTokenStore(); 53 (*store) = new ChromeAccessTokenStore();
54 (*store)->LoadAccessTokens(callback); 54 (*store)->LoadAccessTokens(callback);
55 } 55 }
56 56
57 struct TokenLoadClientForTest { 57 struct TokenLoadClientForTest {
58 void NotReachedCallback(AccessTokenStore::AccessTokenSet /*tokens*/, 58 void NotReachedCallback(AccessTokenStore::AccessTokenSet /*tokens*/,
59 net::URLRequestContextGetter* /*context_getter*/) { 59 net::URLRequestContextGetter* /*context_getter*/) {
60 NOTREACHED() << "This request should have been canceled before callback"; 60 NOTREACHED() << "This request should have been canceled before callback";
61 } 61 }
62 }; 62 };
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 // Set a token for the old default network provider url. 128 // Set a token for the old default network provider url.
129 DoTestStepAndWaitForResults(kOldDefaultNetworkProviderUrl, 129 DoTestStepAndWaitForResults(kOldDefaultNetworkProviderUrl,
130 NULL, &ref_token1); 130 NULL, &ref_token1);
131 // Check that the token related to the old default network provider url 131 // Check that the token related to the old default network provider url
132 // was deleted. 132 // was deleted.
133 DoTestStepAndWaitForResults(kOldDefaultNetworkProviderUrl, 133 DoTestStepAndWaitForResults(kOldDefaultNetworkProviderUrl,
134 NULL, NULL); 134 NULL, NULL);
135 } 135 }
136 136
137 } // namespace 137 } // namespace
OLDNEW
« no previous file with comments | « chrome/browser/feedback/feedback_util.cc ('k') | chrome/browser/google_apis/base_operations_server_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698