| 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 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 258 void set_check_cleartext_permitted(bool check_cleartext_permitted) { | 258 void set_check_cleartext_permitted(bool check_cleartext_permitted) { |
| 259 check_cleartext_permitted_ = check_cleartext_permitted; | 259 check_cleartext_permitted_ = check_cleartext_permitted; |
| 260 } | 260 } |
| 261 | 261 |
| 262 // Returns current value of the |check_cleartext_permitted| flag. | 262 // Returns current value of the |check_cleartext_permitted| flag. |
| 263 bool check_cleartext_permitted() const { return check_cleartext_permitted_; } | 263 bool check_cleartext_permitted() const { return check_cleartext_permitted_; } |
| 264 | 264 |
| 265 // Sets a name for this URLRequestContext. Currently the name is used in | 265 // Sets a name for this URLRequestContext. Currently the name is used in |
| 266 // MemoryDumpProvier to annotate memory usage. The name does not need to be | 266 // MemoryDumpProvier to annotate memory usage. The name does not need to be |
| 267 // unique. | 267 // unique. |
| 268 void set_name(const std::string& name) { name_ = name; } | 268 void set_name(const char* name) { name_ = name; } |
| 269 | 269 |
| 270 // MemoryDumpProvider implementation: | 270 // MemoryDumpProvider implementation: |
| 271 bool OnMemoryDump(const base::trace_event::MemoryDumpArgs& args, | 271 bool OnMemoryDump(const base::trace_event::MemoryDumpArgs& args, |
| 272 base::trace_event::ProcessMemoryDump* pmd) override; | 272 base::trace_event::ProcessMemoryDump* pmd) override; |
| 273 | 273 |
| 274 private: | 274 private: |
| 275 // --------------------------------------------------------------------------- | 275 // --------------------------------------------------------------------------- |
| 276 // Important: When adding any new members below, consider whether they need to | 276 // Important: When adding any new members below, consider whether they need to |
| 277 // be added to CopyFrom. | 277 // be added to CopyFrom. |
| 278 // --------------------------------------------------------------------------- | 278 // --------------------------------------------------------------------------- |
| (...skipping 30 matching lines...) Expand all Loading... |
| 309 | 309 |
| 310 // Enables Brotli Content-Encoding support. | 310 // Enables Brotli Content-Encoding support. |
| 311 bool enable_brotli_; | 311 bool enable_brotli_; |
| 312 // Enables checking system policy before allowing a cleartext http or ws | 312 // Enables checking system policy before allowing a cleartext http or ws |
| 313 // request. Only used on Android. | 313 // request. Only used on Android. |
| 314 bool check_cleartext_permitted_; | 314 bool check_cleartext_permitted_; |
| 315 | 315 |
| 316 // An optional name which can be set to describe this URLRequestContext. | 316 // An optional name which can be set to describe this URLRequestContext. |
| 317 // Used in MemoryDumpProvier to annotate memory usage. The name does not need | 317 // Used in MemoryDumpProvier to annotate memory usage. The name does not need |
| 318 // to be unique. | 318 // to be unique. |
| 319 std::string name_; | 319 const char* name_; |
| 320 | 320 |
| 321 DISALLOW_COPY_AND_ASSIGN(URLRequestContext); | 321 DISALLOW_COPY_AND_ASSIGN(URLRequestContext); |
| 322 }; | 322 }; |
| 323 | 323 |
| 324 } // namespace net | 324 } // namespace net |
| 325 | 325 |
| 326 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_H_ | 326 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_H_ |
| OLD | NEW |