| 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 "chrome/browser/browser_process_impl.h" | 5 #include "chrome/browser/browser_process_impl.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <map> | 10 #include <map> |
| (...skipping 1137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1148 | 1148 |
| 1149 base::SequencedWorkerPool* blocking_pool = | 1149 base::SequencedWorkerPool* blocking_pool = |
| 1150 content::BrowserThread::GetBlockingPool(); | 1150 content::BrowserThread::GetBlockingPool(); |
| 1151 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner( | 1151 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner( |
| 1152 blocking_pool->GetSequencedTaskRunnerWithShutdownBehavior( | 1152 blocking_pool->GetSequencedTaskRunnerWithShutdownBehavior( |
| 1153 blocking_pool->GetSequenceToken(), | 1153 blocking_pool->GetSequenceToken(), |
| 1154 base::SequencedWorkerPool::SKIP_ON_SHUTDOWN)); | 1154 base::SequencedWorkerPool::SKIP_ON_SHUTDOWN)); |
| 1155 | 1155 |
| 1156 base::FilePath user_data_dir; | 1156 base::FilePath user_data_dir; |
| 1157 PathService::Get(chrome::DIR_USER_DATA, &user_data_dir); | 1157 PathService::Get(chrome::DIR_USER_DATA, &user_data_dir); |
| 1158 base::FilePath indexed_ruleset_base_dir = |
| 1159 user_data_dir.Append(subresource_filter::kTopLevelDirectoryName) |
| 1160 .Append(subresource_filter::kIndexedRulesetBaseDirectoryName); |
| 1158 subresource_filter_ruleset_service_.reset( | 1161 subresource_filter_ruleset_service_.reset( |
| 1159 new subresource_filter::RulesetService( | 1162 new subresource_filter::RulesetService( |
| 1160 local_state(), blocking_task_runner, | 1163 local_state(), blocking_task_runner, indexed_ruleset_base_dir)); |
| 1161 user_data_dir.Append(subresource_filter::kRulesetBaseDirectoryName))); | |
| 1162 subresource_filter_ruleset_service_->RegisterDistributor( | 1164 subresource_filter_ruleset_service_->RegisterDistributor( |
| 1163 base::WrapUnique(new subresource_filter::ContentRulesetDistributor)); | 1165 base::WrapUnique(new subresource_filter::ContentRulesetDistributor)); |
| 1164 } | 1166 } |
| 1165 | 1167 |
| 1166 void BrowserProcessImpl::CreateGCMDriver() { | 1168 void BrowserProcessImpl::CreateGCMDriver() { |
| 1167 DCHECK(!gcm_driver_); | 1169 DCHECK(!gcm_driver_); |
| 1168 | 1170 |
| 1169 #if defined(OS_ANDROID) | 1171 #if defined(OS_ANDROID) |
| 1170 // Android's GCMDriver currently makes the assumption that it's a singleton. | 1172 // Android's GCMDriver currently makes the assumption that it's a singleton. |
| 1171 // Until this gets fixed, instantiating multiple Java GCMDrivers will throw | 1173 // Until this gets fixed, instantiating multiple Java GCMDrivers will throw |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1335 } | 1337 } |
| 1336 | 1338 |
| 1337 void BrowserProcessImpl::OnAutoupdateTimer() { | 1339 void BrowserProcessImpl::OnAutoupdateTimer() { |
| 1338 if (CanAutorestartForUpdate()) { | 1340 if (CanAutorestartForUpdate()) { |
| 1339 DLOG(WARNING) << "Detected update. Restarting browser."; | 1341 DLOG(WARNING) << "Detected update. Restarting browser."; |
| 1340 RestartBackgroundInstance(); | 1342 RestartBackgroundInstance(); |
| 1341 } | 1343 } |
| 1342 } | 1344 } |
| 1343 | 1345 |
| 1344 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) | 1346 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) |
| OLD | NEW |