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

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

Issue 22581003: 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
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 #ifndef NET_URL_REQUEST_TEST_URL_FETCHER_FACTORY_H_ 5 #ifndef NET_URL_REQUEST_TEST_URL_FETCHER_FACTORY_H_
6 #define NET_URL_REQUEST_TEST_URL_FETCHER_FACTORY_H_ 6 #define NET_URL_REQUEST_TEST_URL_FETCHER_FACTORY_H_
7 7
8 #include <list> 8 #include <list>
9 #include <map> 9 #include <map>
10 #include <string> 10 #include <string>
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 TestURLFetcherFactory(); 234 TestURLFetcherFactory();
235 virtual ~TestURLFetcherFactory(); 235 virtual ~TestURLFetcherFactory();
236 236
237 virtual URLFetcher* CreateURLFetcher( 237 virtual URLFetcher* CreateURLFetcher(
238 int id, 238 int id,
239 const GURL& url, 239 const GURL& url,
240 URLFetcher::RequestType request_type, 240 URLFetcher::RequestType request_type,
241 URLFetcherDelegate* d) OVERRIDE; 241 URLFetcherDelegate* d) OVERRIDE;
242 TestURLFetcher* GetFetcherByID(int id) const; 242 TestURLFetcher* GetFetcherByID(int id) const;
243 void RemoveFetcherFromMap(int id); 243 void RemoveFetcherFromMap(int id);
244 size_t GetFetcherCount() const;
244 void SetDelegateForTests(TestURLFetcherDelegateForTests* delegate_for_tests); 245 void SetDelegateForTests(TestURLFetcherDelegateForTests* delegate_for_tests);
245 void set_remove_fetcher_on_delete(bool remove_fetcher_on_delete) { 246 void set_remove_fetcher_on_delete(bool remove_fetcher_on_delete) {
246 remove_fetcher_on_delete_ = remove_fetcher_on_delete; 247 remove_fetcher_on_delete_ = remove_fetcher_on_delete;
247 } 248 }
248 249
249 private: 250 private:
250 // Maps from id passed to create to the returned URLFetcher. 251 // Maps from id passed to create to the returned URLFetcher.
251 typedef std::map<int, TestURLFetcher*> Fetchers; 252 typedef std::map<int, TestURLFetcher*> Fetchers;
252 Fetchers fetchers_; 253 Fetchers fetchers_;
253 TestURLFetcherDelegateForTests* delegate_for_tests_; 254 TestURLFetcherDelegateForTests* delegate_for_tests_;
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
413 int id, 414 int id,
414 const GURL& url, 415 const GURL& url,
415 URLFetcher::RequestType request_type, 416 URLFetcher::RequestType request_type,
416 URLFetcherDelegate* d) OVERRIDE; 417 URLFetcherDelegate* d) OVERRIDE;
417 418
418 }; 419 };
419 420
420 } // namespace net 421 } // namespace net
421 422
422 #endif // NET_URL_REQUEST_TEST_URL_FETCHER_FACTORY_H_ 423 #endif // NET_URL_REQUEST_TEST_URL_FETCHER_FACTORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698