| 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 "android_webview/browser/aw_browser_context.h" | 5 #include "android_webview/browser/aw_browser_context.h" |
| 6 | 6 |
| 7 #include "android_webview/browser/aw_form_database_service.h" | 7 #include "android_webview/browser/aw_form_database_service.h" |
| 8 #include "android_webview/browser/aw_pref_store.h" | 8 #include "android_webview/browser/aw_pref_store.h" |
| 9 #include "android_webview/browser/aw_quota_manager_bridge.h" | 9 #include "android_webview/browser/aw_quota_manager_bridge.h" |
| 10 #include "android_webview/browser/aw_resource_context.h" | 10 #include "android_webview/browser/aw_resource_context.h" |
| (...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 206 base::PrefServiceFactory pref_service_factory; | 206 base::PrefServiceFactory pref_service_factory; |
| 207 pref_service_factory.set_user_prefs(make_scoped_refptr(new AwPrefStore())); | 207 pref_service_factory.set_user_prefs(make_scoped_refptr(new AwPrefStore())); |
| 208 pref_service_factory.set_read_error_callback(base::Bind(&HandleReadError)); | 208 pref_service_factory.set_read_error_callback(base::Bind(&HandleReadError)); |
| 209 user_pref_service_ = pref_service_factory.Create(pref_registry).Pass(); | 209 user_pref_service_ = pref_service_factory.Create(pref_registry).Pass(); |
| 210 | 210 |
| 211 user_prefs::UserPrefs::Set(this, user_pref_service_.get()); | 211 user_prefs::UserPrefs::Set(this, user_pref_service_.get()); |
| 212 | 212 |
| 213 if (data_reduction_proxy_settings_.get()) { | 213 if (data_reduction_proxy_settings_.get()) { |
| 214 data_reduction_proxy_settings_->InitDataReductionProxySettings( | 214 data_reduction_proxy_settings_->InitDataReductionProxySettings( |
| 215 user_pref_service_.get(), | 215 user_pref_service_.get(), |
| 216 user_pref_service_.get(), | |
| 217 GetRequestContext()); | 216 GetRequestContext()); |
| 218 | 217 |
| 219 data_reduction_proxy_settings_->SetDataReductionProxyEnabled( | 218 data_reduction_proxy_settings_->SetDataReductionProxyEnabled( |
| 220 data_reduction_proxy_enabled_); | 219 data_reduction_proxy_enabled_); |
| 221 } | 220 } |
| 222 } | 221 } |
| 223 | 222 |
| 224 base::FilePath AwBrowserContext::GetPath() const { | 223 base::FilePath AwBrowserContext::GetPath() const { |
| 225 return context_storage_path_; | 224 return context_storage_path_; |
| 226 } | 225 } |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 291 | 290 |
| 292 void AwBrowserContext::RebuildTable( | 291 void AwBrowserContext::RebuildTable( |
| 293 const scoped_refptr<URLEnumerator>& enumerator) { | 292 const scoped_refptr<URLEnumerator>& enumerator) { |
| 294 // Android WebView rebuilds from WebChromeClient.getVisitedHistory. The client | 293 // Android WebView rebuilds from WebChromeClient.getVisitedHistory. The client |
| 295 // can change in the lifetime of this WebView and may not yet be set here. | 294 // can change in the lifetime of this WebView and may not yet be set here. |
| 296 // Therefore this initialization path is not used. | 295 // Therefore this initialization path is not used. |
| 297 enumerator->OnComplete(true); | 296 enumerator->OnComplete(true); |
| 298 } | 297 } |
| 299 | 298 |
| 300 } // namespace android_webview | 299 } // namespace android_webview |
| OLD | NEW |