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

Side by Side Diff: net/url_request/test_url_fetcher_factory.cc

Issue 23767004: Revert "Handling of multiple concurrent requests from different clients in OAuth2TokenService" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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
« no previous file with comments | « net/url_request/test_url_fetcher_factory.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "net/url_request/test_url_fetcher_factory.h" 5 #include "net/url_request/test_url_fetcher_factory.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 Fetchers::const_iterator i = fetchers_.find(id); 268 Fetchers::const_iterator i = fetchers_.find(id);
269 return i == fetchers_.end() ? NULL : i->second; 269 return i == fetchers_.end() ? NULL : i->second;
270 } 270 }
271 271
272 void TestURLFetcherFactory::RemoveFetcherFromMap(int id) { 272 void TestURLFetcherFactory::RemoveFetcherFromMap(int id) {
273 Fetchers::iterator i = fetchers_.find(id); 273 Fetchers::iterator i = fetchers_.find(id);
274 DCHECK(i != fetchers_.end()); 274 DCHECK(i != fetchers_.end());
275 fetchers_.erase(i); 275 fetchers_.erase(i);
276 } 276 }
277 277
278 size_t TestURLFetcherFactory::GetFetcherCount() const {
279 return fetchers_.size();
280 }
281
282 void TestURLFetcherFactory::SetDelegateForTests( 278 void TestURLFetcherFactory::SetDelegateForTests(
283 TestURLFetcherDelegateForTests* delegate_for_tests) { 279 TestURLFetcherDelegateForTests* delegate_for_tests) {
284 delegate_for_tests_ = delegate_for_tests; 280 delegate_for_tests_ = delegate_for_tests;
285 } 281 }
286 282
287 FakeURLFetcher::FakeURLFetcher(const GURL& url, 283 FakeURLFetcher::FakeURLFetcher(const GURL& url,
288 URLFetcherDelegate* d, 284 URLFetcherDelegate* d,
289 const std::string& response_data, 285 const std::string& response_data,
290 bool success) 286 bool success)
291 : TestURLFetcher(0, url, d), 287 : TestURLFetcher(0, url, d),
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 374
379 URLFetcher* URLFetcherImplFactory::CreateURLFetcher( 375 URLFetcher* URLFetcherImplFactory::CreateURLFetcher(
380 int id, 376 int id,
381 const GURL& url, 377 const GURL& url,
382 URLFetcher::RequestType request_type, 378 URLFetcher::RequestType request_type,
383 URLFetcherDelegate* d) { 379 URLFetcherDelegate* d) {
384 return new URLFetcherImpl(url, request_type, d); 380 return new URLFetcherImpl(url, request_type, d);
385 } 381 }
386 382
387 } // namespace net 383 } // namespace net
OLDNEW
« no previous file with comments | « net/url_request/test_url_fetcher_factory.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698