| 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 <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "android_webview/browser/aw_browser_policy_connector.h" | 9 #include "android_webview/browser/aw_browser_policy_connector.h" |
| 10 #include "android_webview/browser/aw_form_database_service.h" | 10 #include "android_webview/browser/aw_form_database_service.h" |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 // Delete the legacy cache dir (in the app data dir) in 10 seconds after init. | 122 // Delete the legacy cache dir (in the app data dir) in 10 seconds after init. |
| 123 int AwBrowserContext::legacy_cache_removal_delay_ms_ = 10000; | 123 int AwBrowserContext::legacy_cache_removal_delay_ms_ = 10000; |
| 124 | 124 |
| 125 AwBrowserContext::AwBrowserContext( | 125 AwBrowserContext::AwBrowserContext( |
| 126 const FilePath path, | 126 const FilePath path, |
| 127 JniDependencyFactory* native_factory) | 127 JniDependencyFactory* native_factory) |
| 128 : context_storage_path_(path), | 128 : context_storage_path_(path), |
| 129 native_factory_(native_factory) { | 129 native_factory_(native_factory) { |
| 130 DCHECK(!g_browser_context); | 130 DCHECK(!g_browser_context); |
| 131 g_browser_context = this; | 131 g_browser_context = this; |
| 132 BrowserContext::Initialize(this, path); |
| 132 | 133 |
| 133 // This constructor is entered during the creation of ContentBrowserClient, | 134 // This constructor is entered during the creation of ContentBrowserClient, |
| 134 // before browser threads are created. Therefore any checks to enforce | 135 // before browser threads are created. Therefore any checks to enforce |
| 135 // threading (such as BrowserThread::CurrentlyOn()) will fail here. | 136 // threading (such as BrowserThread::CurrentlyOn()) will fail here. |
| 136 } | 137 } |
| 137 | 138 |
| 138 AwBrowserContext::~AwBrowserContext() { | 139 AwBrowserContext::~AwBrowserContext() { |
| 139 DCHECK_EQ(this, g_browser_context); | 140 DCHECK_EQ(this, g_browser_context); |
| 140 g_browser_context = NULL; | 141 g_browser_context = NULL; |
| 141 } | 142 } |
| (...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 470 return; | 471 return; |
| 471 // We don't care about commit_delay for now. It is just a dummy value. | 472 // We don't care about commit_delay for now. It is just a dummy value. |
| 472 base::TimeDelta commit_delay = base::TimeDelta::FromMinutes(60); | 473 base::TimeDelta commit_delay = base::TimeDelta::FromMinutes(60); |
| 473 data_reduction_proxy_service->EnableCompressionStatisticsLogging( | 474 data_reduction_proxy_service->EnableCompressionStatisticsLogging( |
| 474 user_pref_service_.get(), | 475 user_pref_service_.get(), |
| 475 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI), | 476 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI), |
| 476 commit_delay); | 477 commit_delay); |
| 477 } | 478 } |
| 478 | 479 |
| 479 } // namespace android_webview | 480 } // namespace android_webview |
| OLD | NEW |