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 #include "chrome/browser/profiles/profile_io_data.h" | 5 #include "chrome/browser/profiles/profile_io_data.h" |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 ProfileIOData::Handle::GetExtensionsRequestContextGetter() const { | 74 ProfileIOData::Handle::GetExtensionsRequestContextGetter() const { |
75 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 75 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
76 if (!extensions_request_context_getter_) { | 76 if (!extensions_request_context_getter_) { |
77 extensions_request_context_getter_ = | 77 extensions_request_context_getter_ = |
78 ChromeURLRequestContextGetter::CreateOriginalForExtensions( | 78 ChromeURLRequestContextGetter::CreateOriginalForExtensions( |
79 io_data_->lazy_params_->profile, io_data_); | 79 io_data_->lazy_params_->profile, io_data_); |
80 } | 80 } |
81 return extensions_request_context_getter_; | 81 return extensions_request_context_getter_; |
82 } | 82 } |
83 | 83 |
| 84 |
| 85 ProfileIOData::LazyParams::LazyParams() |
| 86 : cache_max_size(0), |
| 87 media_cache_max_size(0), |
| 88 io_thread(NULL), |
| 89 profile(NULL) { |
| 90 } |
| 91 |
| 92 ProfileIOData::LazyParams::~LazyParams() {} |
| 93 |
84 class ProfileIOData::RequestContext : public ChromeURLRequestContext { | 94 class ProfileIOData::RequestContext : public ChromeURLRequestContext { |
85 public: | 95 public: |
86 RequestContext(); | 96 RequestContext(); |
87 ~RequestContext(); | 97 ~RequestContext(); |
88 | 98 |
89 void set_profile_io_data(const ProfileIOData* profile_io_data) { | 99 void set_profile_io_data(const ProfileIOData* profile_io_data) { |
90 profile_io_data_ = profile_io_data; | 100 profile_io_data_ = profile_io_data; |
91 } | 101 } |
92 | 102 |
93 private: | 103 private: |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 // TODO(willchan): Initialize more of the contexts! | 193 // TODO(willchan): Initialize more of the contexts! |
184 | 194 |
185 // TODO(willchan): Enable this when LazyInitialize() is able to fully | 195 // TODO(willchan): Enable this when LazyInitialize() is able to fully |
186 // initialize all the ChromeURLRequestContexts. | 196 // initialize all the ChromeURLRequestContexts. |
187 #if 0 | 197 #if 0 |
188 params_.reset(); | 198 params_.reset(); |
189 #endif | 199 #endif |
190 | 200 |
191 initialized_ = true; | 201 initialized_ = true; |
192 } | 202 } |
OLD | NEW |