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

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

Issue 2825003002: Rewrite base::Bind to base::BindOnce with base_bind_rewriters in //chrome/browser/{a,b,c,d,e,f,g}* (Closed)
Patch Set: split rest of changes to 3 CLs Created 3 years, 8 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
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/strings/string_util.h" 7 #include "base/strings/string_util.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 48
49 void GeolocationAccessTokenStoreTest::DoTestStepAndWaitForResults( 49 void GeolocationAccessTokenStoreTest::DoTestStepAndWaitForResults(
50 const char* ref_url, const base::string16* token_to_expect, 50 const char* ref_url, const base::string16* token_to_expect,
51 const base::string16* token_to_set) { 51 const base::string16* token_to_set) {
52 ref_url_ = GURL(ref_url); 52 ref_url_ = GURL(ref_url);
53 token_to_expect_ = token_to_expect; 53 token_to_expect_ = token_to_expect;
54 token_to_set_ = token_to_set; 54 token_to_set_ = token_to_set;
55 55
56 BrowserThread::PostTask( 56 BrowserThread::PostTask(
57 kExpectedClientThreadId, FROM_HERE, 57 kExpectedClientThreadId, FROM_HERE,
58 base::Bind( 58 base::BindOnce(
59 &AccessTokenStore::LoadAccessTokens, 59 &AccessTokenStore::LoadAccessTokens, token_store_,
60 token_store_,
61 base::Bind( 60 base::Bind(
62 &GeolocationAccessTokenStoreTest::OnAccessTokenStoresLoaded, 61 &GeolocationAccessTokenStoreTest::OnAccessTokenStoresLoaded,
63 base::Unretained(this)))); 62 base::Unretained(this))));
64 content::RunMessageLoop(); 63 content::RunMessageLoop();
65 } 64 }
66 65
67 void GeolocationAccessTokenStoreTest::OnAccessTokenStoresLoaded( 66 void GeolocationAccessTokenStoreTest::OnAccessTokenStoresLoaded(
68 AccessTokenStore::AccessTokenMap access_token_map, 67 AccessTokenStore::AccessTokenMap access_token_map,
69 const scoped_refptr<net::URLRequestContextGetter>& context_getter) { 68 const scoped_refptr<net::URLRequestContextGetter>& context_getter) {
70 ASSERT_TRUE(BrowserThread::CurrentlyOn(kExpectedClientThreadId)) 69 ASSERT_TRUE(BrowserThread::CurrentlyOn(kExpectedClientThreadId))
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 // Set a token for the old default network provider url. 113 // Set a token for the old default network provider url.
115 DoTestStepAndWaitForResults(kOldDefaultNetworkProviderUrl, 114 DoTestStepAndWaitForResults(kOldDefaultNetworkProviderUrl,
116 nullptr, &ref_token1); 115 nullptr, &ref_token1);
117 // Check that the token related to the old default network provider url 116 // Check that the token related to the old default network provider url
118 // was deleted. 117 // was deleted.
119 DoTestStepAndWaitForResults(kOldDefaultNetworkProviderUrl, 118 DoTestStepAndWaitForResults(kOldDefaultNetworkProviderUrl,
120 nullptr, nullptr); 119 nullptr, nullptr);
121 } 120 }
122 121
123 } // namespace 122 } // namespace
OLDNEW
« no previous file with comments | « chrome/browser/gcm/fake_gcm_profile_service.cc ('k') | chrome/browser/geolocation/chrome_access_token_store.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698