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

Side by Side Diff: ios/net/request_tracker.h

Issue 1043243003: Upstream most of ios/web/net (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove accidentally-added clients Created 5 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
« no previous file with comments | « no previous file | ios/net/request_tracker.mm » ('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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 IOS_NET_REQUEST_TRACKER_H_ 5 #ifndef IOS_NET_REQUEST_TRACKER_H_
6 #define IOS_NET_REQUEST_TRACKER_H_ 6 #define IOS_NET_REQUEST_TRACKER_H_
7 7
8 #import <Foundation/Foundation.h> 8 #import <Foundation/Foundation.h>
9 9
10 #include "base/callback_forward.h" 10 #include "base/callback_forward.h"
(...skipping 26 matching lines...) Expand all
37 CACHE_RELOAD, 37 CACHE_RELOAD,
38 CACHE_HISTORY, 38 CACHE_HISTORY,
39 CACHE_BYPASS, 39 CACHE_BYPASS,
40 CACHE_ONLY, 40 CACHE_ONLY,
41 }; 41 };
42 42
43 typedef base::Callback<void(bool)> SSLCallback; 43 typedef base::Callback<void(bool)> SSLCallback;
44 44
45 class RequestTrackerFactory { 45 class RequestTrackerFactory {
46 public: 46 public:
47 virtual ~RequestTrackerFactory();
48
47 // Returns false if |request| is associated to an invalid tracker and should 49 // Returns false if |request| is associated to an invalid tracker and should
48 // be cancelled. In this case |tracker| is set to nullptr. 50 // be cancelled. In this case |tracker| is set to nullptr.
49 // Returns true if |request| is associated with a valid tracker or if the 51 // Returns true if |request| is associated with a valid tracker or if the
50 // request is not associated to any tracker. 52 // request is not associated to any tracker.
51 virtual bool GetRequestTracker(NSURLRequest* request, 53 virtual bool GetRequestTracker(NSURLRequest* request,
52 base::WeakPtr<RequestTracker>* tracker) = 0; 54 base::WeakPtr<RequestTracker>* tracker) = 0;
53 }; 55 };
54 56
55 // Sets the RequestTrackerFactory. The factory has to be set before the 57 // Sets the RequestTrackerFactory. The factory has to be set before the
56 // GetRequestTracker() function can be called. 58 // GetRequestTracker() function can be called.
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 bool initialized_; 165 bool initialized_;
164 CacheMode cache_mode_; 166 CacheMode cache_mode_;
165 base::ThreadChecker thread_checker_; 167 base::ThreadChecker thread_checker_;
166 168
167 base::WeakPtrFactory<RequestTracker> weak_ptr_factory_; 169 base::WeakPtrFactory<RequestTracker> weak_ptr_factory_;
168 }; 170 };
169 171
170 } // namespace net 172 } // namespace net
171 173
172 #endif // IOS_NET_REQUEST_TRACKER_H_ 174 #endif // IOS_NET_REQUEST_TRACKER_H_
OLDNEW
« no previous file with comments | « no previous file | ios/net/request_tracker.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698