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

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

Issue 2910473005: Deprecate NonThreadSafe in net/ in favor of SequenceChecker/ThreadChecker. (Closed)
Patch Set: rebase on r476634 Created 3 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
« no previous file with comments | « net/url_request/test_url_fetcher_factory.h ('k') | net/url_request/url_request.h » ('j') | 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 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 18 matching lines...) Expand all
29 29
30 namespace net { 30 namespace net {
31 31
32 ScopedURLFetcherFactory::ScopedURLFetcherFactory( 32 ScopedURLFetcherFactory::ScopedURLFetcherFactory(
33 URLFetcherFactory* factory) { 33 URLFetcherFactory* factory) {
34 DCHECK(!URLFetcherImpl::factory()); 34 DCHECK(!URLFetcherImpl::factory());
35 URLFetcherImpl::set_factory(factory); 35 URLFetcherImpl::set_factory(factory);
36 } 36 }
37 37
38 ScopedURLFetcherFactory::~ScopedURLFetcherFactory() { 38 ScopedURLFetcherFactory::~ScopedURLFetcherFactory() {
39 DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
39 DCHECK(URLFetcherImpl::factory()); 40 DCHECK(URLFetcherImpl::factory());
40 URLFetcherImpl::set_factory(NULL); 41 URLFetcherImpl::set_factory(NULL);
41 } 42 }
42 43
43 TestURLFetcher::TestURLFetcher(int id, const GURL& url, URLFetcherDelegate* d) 44 TestURLFetcher::TestURLFetcher(int id, const GURL& url, URLFetcherDelegate* d)
44 : owner_(NULL), 45 : owner_(NULL),
45 id_(id), 46 id_(id),
46 original_url_(url), 47 original_url_(url),
47 delegate_(d), 48 delegate_(d),
48 delegate_for_tests_(NULL), 49 delegate_for_tests_(NULL),
(...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after
488 int id, 489 int id,
489 const GURL& url, 490 const GURL& url,
490 URLFetcher::RequestType request_type, 491 URLFetcher::RequestType request_type,
491 URLFetcherDelegate* d, 492 URLFetcherDelegate* d,
492 NetworkTrafficAnnotationTag traffic_annotation) { 493 NetworkTrafficAnnotationTag traffic_annotation) {
493 return std::unique_ptr<URLFetcher>( 494 return std::unique_ptr<URLFetcher>(
494 new URLFetcherImpl(url, request_type, d, traffic_annotation)); 495 new URLFetcherImpl(url, request_type, d, traffic_annotation));
495 } 496 }
496 497
497 } // namespace net 498 } // namespace net
OLDNEW
« no previous file with comments | « net/url_request/test_url_fetcher_factory.h ('k') | net/url_request/url_request.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698