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 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
340 // Intentionally returning NULL as 'Extensions' and 'Apps' not supported. | 340 // Intentionally returning NULL as 'Extensions' and 'Apps' not supported. |
341 return NULL; | 341 return NULL; |
342 } | 342 } |
343 | 343 |
344 content::PushMessagingService* AwBrowserContext::GetPushMessagingService() { | 344 content::PushMessagingService* AwBrowserContext::GetPushMessagingService() { |
345 // TODO(johnme): Support push messaging in WebView. | 345 // TODO(johnme): Support push messaging in WebView. |
346 return NULL; | 346 return NULL; |
347 } | 347 } |
348 | 348 |
349 content::SSLHostStateDelegate* AwBrowserContext::GetSSLHostStateDelegate() { | 349 content::SSLHostStateDelegate* AwBrowserContext::GetSSLHostStateDelegate() { |
350 return NULL; | 350 if (!ssl_host_state_delegate_.get()) { |
| 351 ssl_host_state_delegate_.reset(new AwSSLHostStateDelegate()); |
| 352 } |
| 353 return ssl_host_state_delegate_.get(); |
351 } | 354 } |
352 | 355 |
353 void AwBrowserContext::RebuildTable( | 356 void AwBrowserContext::RebuildTable( |
354 const scoped_refptr<URLEnumerator>& enumerator) { | 357 const scoped_refptr<URLEnumerator>& enumerator) { |
355 // Android WebView rebuilds from WebChromeClient.getVisitedHistory. The client | 358 // Android WebView rebuilds from WebChromeClient.getVisitedHistory. The client |
356 // can change in the lifetime of this WebView and may not yet be set here. | 359 // can change in the lifetime of this WebView and may not yet be set here. |
357 // Therefore this initialization path is not used. | 360 // Therefore this initialization path is not used. |
358 enumerator->OnComplete(true); | 361 enumerator->OnComplete(true); |
359 } | 362 } |
360 | 363 |
361 void AwBrowserContext::CreateDataReductionProxyStatisticsIfNecessary() { | 364 void AwBrowserContext::CreateDataReductionProxyStatisticsIfNecessary() { |
362 DCHECK(user_pref_service_.get()); | 365 DCHECK(user_pref_service_.get()); |
363 | 366 |
364 if (!data_reduction_proxy_statistics_.get()) { | 367 if (!data_reduction_proxy_statistics_.get()) { |
365 // We don't care about commit_delay for now. It is just a dummy value. | 368 // We don't care about commit_delay for now. It is just a dummy value. |
366 base::TimeDelta commit_delay = base::TimeDelta::FromMinutes(60); | 369 base::TimeDelta commit_delay = base::TimeDelta::FromMinutes(60); |
367 data_reduction_proxy_statistics_ = | 370 data_reduction_proxy_statistics_ = |
368 scoped_ptr<data_reduction_proxy::DataReductionProxyStatisticsPrefs>( | 371 scoped_ptr<data_reduction_proxy::DataReductionProxyStatisticsPrefs>( |
369 new data_reduction_proxy::DataReductionProxyStatisticsPrefs( | 372 new data_reduction_proxy::DataReductionProxyStatisticsPrefs( |
370 user_pref_service_.get(), | 373 user_pref_service_.get(), |
371 base::MessageLoopProxy::current(), | 374 base::MessageLoopProxy::current(), |
372 commit_delay)); | 375 commit_delay)); |
373 } | 376 } |
374 } | 377 } |
375 | 378 |
376 } // namespace android_webview | 379 } // namespace android_webview |
OLD | NEW |