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 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 pref_service_factory.set_read_error_callback(base::Bind(&HandleReadError)); | 163 pref_service_factory.set_read_error_callback(base::Bind(&HandleReadError)); |
164 user_pref_service_ = pref_service_factory.Create(pref_registry).Pass(); | 164 user_pref_service_ = pref_service_factory.Create(pref_registry).Pass(); |
165 | 165 |
166 user_prefs::UserPrefs::Set(this, user_pref_service_.get()); | 166 user_prefs::UserPrefs::Set(this, user_pref_service_.get()); |
167 | 167 |
168 data_reduction_proxy_settings_->InitDataReductionProxySettings( | 168 data_reduction_proxy_settings_->InitDataReductionProxySettings( |
169 user_pref_service_.get(), | 169 user_pref_service_.get(), |
170 user_pref_service_.get(), | 170 user_pref_service_.get(), |
171 GetRequestContext()); | 171 GetRequestContext()); |
172 | 172 |
173 //TODO(sgurun): Attach this to the API. It is currently hard coded in a | 173 // Data Reduction Proxy is always disabled by default. |
174 // disabled state. | |
175 data_reduction_proxy_settings_->SetDataReductionProxyEnabled(false); | 174 data_reduction_proxy_settings_->SetDataReductionProxyEnabled(false); |
176 } | 175 } |
177 | 176 |
178 base::FilePath AwBrowserContext::GetPath() const { | 177 base::FilePath AwBrowserContext::GetPath() const { |
179 return context_storage_path_; | 178 return context_storage_path_; |
180 } | 179 } |
181 | 180 |
182 bool AwBrowserContext::IsOffTheRecord() const { | 181 bool AwBrowserContext::IsOffTheRecord() const { |
183 // Android WebView does not support off the record profile yet. | 182 // Android WebView does not support off the record profile yet. |
184 return false; | 183 return false; |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
281 | 280 |
282 void AwBrowserContext::RebuildTable( | 281 void AwBrowserContext::RebuildTable( |
283 const scoped_refptr<URLEnumerator>& enumerator) { | 282 const scoped_refptr<URLEnumerator>& enumerator) { |
284 // Android WebView rebuilds from WebChromeClient.getVisitedHistory. The client | 283 // Android WebView rebuilds from WebChromeClient.getVisitedHistory. The client |
285 // can change in the lifetime of this WebView and may not yet be set here. | 284 // can change in the lifetime of this WebView and may not yet be set here. |
286 // Therefore this initialization path is not used. | 285 // Therefore this initialization path is not used. |
287 enumerator->OnComplete(true); | 286 enumerator->OnComplete(true); |
288 } | 287 } |
289 | 288 |
290 } // namespace android_webview | 289 } // namespace android_webview |
OLD | NEW |