OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_ | 5 #ifndef CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_ |
6 #define CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_ | 6 #define CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <set> | 9 #include <set> |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 // with a content::ResourceContext, and they want access to Chrome data for | 87 // with a content::ResourceContext, and they want access to Chrome data for |
88 // that profile. | 88 // that profile. |
89 HostContentSettingsMap* GetHostContentSettingsMap() const; | 89 HostContentSettingsMap* GetHostContentSettingsMap() const; |
90 | 90 |
91 protected: | 91 protected: |
92 friend class base::RefCountedThreadSafe<ProfileIOData>; | 92 friend class base::RefCountedThreadSafe<ProfileIOData>; |
93 | 93 |
94 class RequestContext : public ChromeURLRequestContext { | 94 class RequestContext : public ChromeURLRequestContext { |
95 public: | 95 public: |
96 RequestContext(); | 96 RequestContext(); |
97 ~RequestContext(); | 97 virtual ~RequestContext(); |
98 | 98 |
99 // Setter is used to transfer ownership of the ProfileIOData to the context. | 99 // Setter is used to transfer ownership of the ProfileIOData to the context. |
100 void set_profile_io_data(const ProfileIOData* profile_io_data) { | 100 void set_profile_io_data(const ProfileIOData* profile_io_data) { |
101 profile_io_data_ = profile_io_data; | 101 profile_io_data_ = profile_io_data; |
102 } | 102 } |
103 | 103 |
104 private: | 104 private: |
105 scoped_refptr<const ProfileIOData> profile_io_data_; | 105 scoped_refptr<const ProfileIOData> profile_io_data_; |
106 }; | 106 }; |
107 | 107 |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
256 | 256 |
257 // These are only valid in between LazyInitialize() and their accessor being | 257 // These are only valid in between LazyInitialize() and their accessor being |
258 // called. | 258 // called. |
259 mutable scoped_refptr<RequestContext> main_request_context_; | 259 mutable scoped_refptr<RequestContext> main_request_context_; |
260 mutable scoped_refptr<RequestContext> extensions_request_context_; | 260 mutable scoped_refptr<RequestContext> extensions_request_context_; |
261 | 261 |
262 DISALLOW_COPY_AND_ASSIGN(ProfileIOData); | 262 DISALLOW_COPY_AND_ASSIGN(ProfileIOData); |
263 }; | 263 }; |
264 | 264 |
265 #endif // CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_ | 265 #endif // CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_ |
OLD | NEW |