| 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 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 249 | 249 |
| 250 // TODO(dgn) lazy init, see http://crbug.com/521542 | 250 // TODO(dgn) lazy init, see http://crbug.com/521542 |
| 251 data_reduction_proxy_settings_->InitDataReductionProxySettings( | 251 data_reduction_proxy_settings_->InitDataReductionProxySettings( |
| 252 kDataReductionProxyEnabled, user_pref_service_.get(), | 252 kDataReductionProxyEnabled, user_pref_service_.get(), |
| 253 data_reduction_proxy_io_data_.get(), | 253 data_reduction_proxy_io_data_.get(), |
| 254 std::move(data_reduction_proxy_service_)); | 254 std::move(data_reduction_proxy_service_)); |
| 255 data_reduction_proxy_settings_->MaybeActivateDataReductionProxy(true); | 255 data_reduction_proxy_settings_->MaybeActivateDataReductionProxy(true); |
| 256 | 256 |
| 257 blacklist_manager_.reset(CreateURLBlackListManager(user_pref_service_.get())); | 257 blacklist_manager_.reset(CreateURLBlackListManager(user_pref_service_.get())); |
| 258 | 258 |
| 259 // UMA uses randomly-generated GUIDs (globally unique identifiers) to |
| 260 // anonymously identify logs. Every WebView-using app on every device |
| 261 // is given a GUID, stored in this file in the app's data directory. |
| 262 const FilePath guid_file_path = |
| 263 GetPath().Append(FILE_PATH_LITERAL("metrics_guid")); |
| 264 |
| 259 AwMetricsServiceClient::GetInstance()->Initialize(user_pref_service_.get(), | 265 AwMetricsServiceClient::GetInstance()->Initialize(user_pref_service_.get(), |
| 260 GetRequestContext()); | 266 GetRequestContext(), |
| 267 guid_file_path); |
| 261 } | 268 } |
| 262 | 269 |
| 263 void AwBrowserContext::PostMainMessageLoopRun() { | 270 void AwBrowserContext::PostMainMessageLoopRun() { |
| 264 AwMetricsServiceClient::GetInstance()->Finalize(); | 271 AwMetricsServiceClient::GetInstance()->Finalize(); |
| 265 } | 272 } |
| 266 | 273 |
| 267 void AwBrowserContext::AddVisitedURLs(const std::vector<GURL>& urls) { | 274 void AwBrowserContext::AddVisitedURLs(const std::vector<GURL>& urls) { |
| 268 DCHECK(visitedlink_master_); | 275 DCHECK(visitedlink_master_); |
| 269 visitedlink_master_->AddURLs(urls); | 276 visitedlink_master_->AddURLs(urls); |
| 270 } | 277 } |
| (...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 471 return; | 478 return; |
| 472 // We don't care about commit_delay for now. It is just a dummy value. | 479 // We don't care about commit_delay for now. It is just a dummy value. |
| 473 base::TimeDelta commit_delay = base::TimeDelta::FromMinutes(60); | 480 base::TimeDelta commit_delay = base::TimeDelta::FromMinutes(60); |
| 474 data_reduction_proxy_service->EnableCompressionStatisticsLogging( | 481 data_reduction_proxy_service->EnableCompressionStatisticsLogging( |
| 475 user_pref_service_.get(), | 482 user_pref_service_.get(), |
| 476 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI), | 483 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI), |
| 477 commit_delay); | 484 commit_delay); |
| 478 } | 485 } |
| 479 | 486 |
| 480 } // namespace android_webview | 487 } // namespace android_webview |
| OLD | NEW |