OLD | NEW |
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 // This class represents contextual information (cookies, cache, etc.) | 5 // This class represents contextual information (cookies, cache, etc.) |
6 // that's necessary when processing resource requests. | 6 // that's necessary when processing resource requests. |
7 | 7 |
8 #ifndef NET_URL_REQUEST_URL_REQUEST_CONTEXT_H_ | 8 #ifndef NET_URL_REQUEST_URL_REQUEST_CONTEXT_H_ |
9 #define NET_URL_REQUEST_URL_REQUEST_CONTEXT_H_ | 9 #define NET_URL_REQUEST_URL_REQUEST_CONTEXT_H_ |
10 | 10 |
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
274 | 274 |
275 // Returns current value of the |check_cleartext_permitted| flag. | 275 // Returns current value of the |check_cleartext_permitted| flag. |
276 bool check_cleartext_permitted() const { return check_cleartext_permitted_; } | 276 bool check_cleartext_permitted() const { return check_cleartext_permitted_; } |
277 | 277 |
278 // Sets a name for this URLRequestContext. Currently the name is used in | 278 // Sets a name for this URLRequestContext. Currently the name is used in |
279 // MemoryDumpProvier to annotate memory usage. The name does not need to be | 279 // MemoryDumpProvier to annotate memory usage. The name does not need to be |
280 // unique. | 280 // unique. |
281 void set_name(const char* name) { name_ = name; } | 281 void set_name(const char* name) { name_ = name; } |
282 | 282 |
283 // MemoryDumpProvider implementation: | 283 // MemoryDumpProvider implementation: |
| 284 // This is reported as |
| 285 // "memory:chrome:all_processes:reported_by_chrome:net:effective_size_avg." |
284 bool OnMemoryDump(const base::trace_event::MemoryDumpArgs& args, | 286 bool OnMemoryDump(const base::trace_event::MemoryDumpArgs& args, |
285 base::trace_event::ProcessMemoryDump* pmd) override; | 287 base::trace_event::ProcessMemoryDump* pmd) override; |
286 | 288 |
287 void AssertCalledOnValidThread() { | 289 void AssertCalledOnValidThread() { |
288 DCHECK_CALLED_ON_VALID_THREAD(thread_checker_); | 290 DCHECK_CALLED_ON_VALID_THREAD(thread_checker_); |
289 } | 291 } |
290 | 292 |
291 private: | 293 private: |
292 // --------------------------------------------------------------------------- | 294 // --------------------------------------------------------------------------- |
293 // Important: When adding any new members below, consider whether they need to | 295 // Important: When adding any new members below, consider whether they need to |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
341 mutable size_t largest_outstanding_requests_count_seen_; | 343 mutable size_t largest_outstanding_requests_count_seen_; |
342 | 344 |
343 THREAD_CHECKER(thread_checker_); | 345 THREAD_CHECKER(thread_checker_); |
344 | 346 |
345 DISALLOW_COPY_AND_ASSIGN(URLRequestContext); | 347 DISALLOW_COPY_AND_ASSIGN(URLRequestContext); |
346 }; | 348 }; |
347 | 349 |
348 } // namespace net | 350 } // namespace net |
349 | 351 |
350 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_H_ | 352 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_H_ |
OLD | NEW |