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

Side by Side Diff: chrome/browser/profiles/profile_impl_io_data.h

Issue 7384008: Revert 92668 - Remove more unnecessary ChromeURLRequestContext members. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 5 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 | Annotate | Revision Log
OLDNEW
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_IMPL_IO_DATA_H_ 5 #ifndef CHROME_BROWSER_PROFILES_PROFILE_IMPL_IO_DATA_H_
6 #define CHROME_BROWSER_PROFILES_PROFILE_IMPL_IO_DATA_H_ 6 #define CHROME_BROWSER_PROFILES_PROFILE_IMPL_IO_DATA_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/callback.h"
11 #include "base/hash_tables.h" 10 #include "base/hash_tables.h"
12 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
13 #include "chrome/browser/profiles/profile_io_data.h" 12 #include "chrome/browser/profiles/profile_io_data.h"
14 13
15 namespace net { 14 namespace net {
16 class HttpTransactionFactory; 15 class HttpTransactionFactory;
17 } // namespace net 16 } // namespace net
18 17
19 class ProfileImplIOData : public ProfileIOData { 18 class ProfileImplIOData : public ProfileIOData {
20 public: 19 public:
21 class Handle { 20 class Handle {
22 public: 21 public:
23 explicit Handle(Profile* profile); 22 explicit Handle(Profile* profile);
24 ~Handle(); 23 ~Handle();
25 24
26 bool HasMainRequestContext() const { 25 bool HasMainRequestContext() const {
27 return main_request_context_getter_ != NULL; 26 return main_request_context_getter_ != NULL;
28 } 27 }
29 28
30 // Init() must be called before ~Handle(). It records all the necessary 29 // Init() must be called before ~Handle(). It records all the necessary
31 // parameters needed to construct a ChromeURLRequestContextGetter. 30 // parameters needed to construct a ChromeURLRequestContextGetter.
32 void Init(const FilePath& cookie_path, 31 void Init(const FilePath& cookie_path,
33 const FilePath& cache_path, 32 const FilePath& cache_path,
34 int cache_max_size, 33 int cache_max_size,
35 const FilePath& media_cache_path, 34 const FilePath& media_cache_path,
36 int media_cache_max_size, 35 int media_cache_max_size,
37 const FilePath& extensions_cookie_path, 36 const FilePath& extensions_cookie_path,
38 const FilePath& app_path); 37 const FilePath& app_path);
39 38
40 base::Callback<ChromeURLDataManagerBackend*(void)>
41 GetChromeURLDataManagerBackendGetter() const;
42 const content::ResourceContext& GetResourceContext() const; 39 const content::ResourceContext& GetResourceContext() const;
43 scoped_refptr<ChromeURLRequestContextGetter> 40 scoped_refptr<ChromeURLRequestContextGetter>
44 GetMainRequestContextGetter() const; 41 GetMainRequestContextGetter() const;
45 scoped_refptr<ChromeURLRequestContextGetter> 42 scoped_refptr<ChromeURLRequestContextGetter>
46 GetMediaRequestContextGetter() const; 43 GetMediaRequestContextGetter() const;
47 scoped_refptr<ChromeURLRequestContextGetter> 44 scoped_refptr<ChromeURLRequestContextGetter>
48 GetExtensionsRequestContextGetter() const; 45 GetExtensionsRequestContextGetter() const;
49 scoped_refptr<ChromeURLRequestContextGetter> 46 scoped_refptr<ChromeURLRequestContextGetter>
50 GetIsolatedAppRequestContextGetter( 47 GetIsolatedAppRequestContextGetter(
51 const std::string& app_id) const; 48 const std::string& app_id) const;
(...skipping 16 matching lines...) Expand all
68 // thread. The getters will be deleted on the IO thread, so they will 65 // thread. The getters will be deleted on the IO thread, so they will
69 // release their refs to their contexts, which will release the last refs to 66 // release their refs to their contexts, which will release the last refs to
70 // the ProfileIOData on the IO thread. 67 // the ProfileIOData on the IO thread.
71 mutable scoped_refptr<ChromeURLRequestContextGetter> 68 mutable scoped_refptr<ChromeURLRequestContextGetter>
72 main_request_context_getter_; 69 main_request_context_getter_;
73 mutable scoped_refptr<ChromeURLRequestContextGetter> 70 mutable scoped_refptr<ChromeURLRequestContextGetter>
74 media_request_context_getter_; 71 media_request_context_getter_;
75 mutable scoped_refptr<ChromeURLRequestContextGetter> 72 mutable scoped_refptr<ChromeURLRequestContextGetter>
76 extensions_request_context_getter_; 73 extensions_request_context_getter_;
77 mutable ChromeURLRequestContextGetterMap app_request_context_getter_map_; 74 mutable ChromeURLRequestContextGetterMap app_request_context_getter_map_;
78 scoped_refptr<ProfileImplIOData> io_data_; 75 const scoped_refptr<ProfileImplIOData> io_data_;
79 76
80 Profile* const profile_; 77 Profile* const profile_;
81 78
82 mutable bool initialized_; 79 mutable bool initialized_;
83 80
84 DISALLOW_COPY_AND_ASSIGN(Handle); 81 DISALLOW_COPY_AND_ASSIGN(Handle);
85 }; 82 };
86 83
87 private: 84 private:
88 friend class base::RefCountedThreadSafe<ProfileImplIOData>; 85 friend class base::RefCountedThreadSafe<ProfileImplIOData>;
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 mutable scoped_ptr<net::HttpTransactionFactory> media_http_factory_; 123 mutable scoped_ptr<net::HttpTransactionFactory> media_http_factory_;
127 124
128 // Parameters needed for isolated apps. 125 // Parameters needed for isolated apps.
129 FilePath app_path_; 126 FilePath app_path_;
130 mutable bool clear_local_state_on_exit_; 127 mutable bool clear_local_state_on_exit_;
131 128
132 DISALLOW_COPY_AND_ASSIGN(ProfileImplIOData); 129 DISALLOW_COPY_AND_ASSIGN(ProfileImplIOData);
133 }; 130 };
134 131
135 #endif // CHROME_BROWSER_PROFILES_PROFILE_IMPL_IO_DATA_H_ 132 #endif // CHROME_BROWSER_PROFILES_PROFILE_IMPL_IO_DATA_H_
OLDNEW
« no previous file with comments | « chrome/browser/profiles/profile_impl.cc ('k') | chrome/browser/profiles/profile_impl_io_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698