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 #include "chrome/browser/profiles/profile_impl_io_data.h" | 5 #include "chrome/browser/profiles/profile_impl_io_data.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 | 117 |
118 if (!main_request_context_getter_) { | 118 if (!main_request_context_getter_) { |
119 main_request_context_getter_ = | 119 main_request_context_getter_ = |
120 ChromeURLRequestContextGetter::CreateOriginal( | 120 ChromeURLRequestContextGetter::CreateOriginal( |
121 profile_, io_data_); | 121 profile_, io_data_); |
122 } | 122 } |
123 io_data_->predictor_->InitNetworkPredictor(profile_->GetPrefs(), | 123 io_data_->predictor_->InitNetworkPredictor(profile_->GetPrefs(), |
124 local_state, | 124 local_state, |
125 io_thread, | 125 io_thread, |
126 main_request_context_getter_); | 126 main_request_context_getter_); |
| 127 |
| 128 ChromeNetworkDelegate::InitializeMetricsEnabled( |
| 129 io_data_->enable_metrics(), local_state); |
127 } | 130 } |
128 | 131 |
129 base::Callback<ChromeURLDataManagerBackend*(void)> | 132 base::Callback<ChromeURLDataManagerBackend*(void)> |
130 ProfileImplIOData::Handle::GetChromeURLDataManagerBackendGetter() const { | 133 ProfileImplIOData::Handle::GetChromeURLDataManagerBackendGetter() const { |
131 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 134 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
132 LazyInitialize(); | 135 LazyInitialize(); |
133 return base::Bind(&ProfileIOData::GetChromeURLDataManagerBackend, | 136 return base::Bind(&ProfileIOData::GetChromeURLDataManagerBackend, |
134 base::Unretained(io_data_)); | 137 base::Unretained(io_data_)); |
135 } | 138 } |
136 | 139 |
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
506 scoped_refptr<ChromeURLRequestContext> | 509 scoped_refptr<ChromeURLRequestContext> |
507 ProfileImplIOData::AcquireIsolatedAppRequestContext( | 510 ProfileImplIOData::AcquireIsolatedAppRequestContext( |
508 scoped_refptr<ChromeURLRequestContext> main_context, | 511 scoped_refptr<ChromeURLRequestContext> main_context, |
509 const std::string& app_id) const { | 512 const std::string& app_id) const { |
510 // We create per-app contexts on demand, unlike the others above. | 513 // We create per-app contexts on demand, unlike the others above. |
511 scoped_refptr<ChromeURLRequestContext> app_request_context = | 514 scoped_refptr<ChromeURLRequestContext> app_request_context = |
512 InitializeAppRequestContext(main_context, app_id); | 515 InitializeAppRequestContext(main_context, app_id); |
513 DCHECK(app_request_context); | 516 DCHECK(app_request_context); |
514 return app_request_context; | 517 return app_request_context; |
515 } | 518 } |
OLD | NEW |