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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
122 | 122 |
123 #if defined(OS_WIN) | 123 #if defined(OS_WIN) |
124 #include "base/win/windows_version.h" | 124 #include "base/win/windows_version.h" |
125 #include "ui/views/focus/view_storage.h" | 125 #include "ui/views/focus/view_storage.h" |
126 #elif defined(OS_MACOSX) | 126 #elif defined(OS_MACOSX) |
127 #include "chrome/browser/chrome_browser_main_mac.h" | 127 #include "chrome/browser/chrome_browser_main_mac.h" |
128 #endif | 128 #endif |
129 | 129 |
130 #if !defined(OS_ANDROID) | 130 #if !defined(OS_ANDROID) |
131 #include "chrome/browser/lifetime/keep_alive_registry.h" | 131 #include "chrome/browser/lifetime/keep_alive_registry.h" |
132 #include "chrome/browser/services/gcm/gcm_product_util.h" | |
132 #include "chrome/browser/ui/user_manager.h" | 133 #include "chrome/browser/ui/user_manager.h" |
133 #include "components/gcm_driver/gcm_client_factory.h" | 134 #include "components/gcm_driver/gcm_client_factory.h" |
134 #include "components/gcm_driver/gcm_desktop_utils.h" | 135 #include "components/gcm_driver/gcm_desktop_utils.h" |
135 #endif | 136 #endif |
136 | 137 |
137 #if BUILDFLAG(ENABLE_BACKGROUND) | 138 #if BUILDFLAG(ENABLE_BACKGROUND) |
138 #include "chrome/browser/background/background_mode_manager.h" | 139 #include "chrome/browser/background/background_mode_manager.h" |
139 #endif | 140 #endif |
140 | 141 |
141 #if defined(ENABLE_EXTENSIONS) | 142 #if defined(ENABLE_EXTENSIONS) |
(...skipping 1032 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1174 base::SequencedWorkerPool* worker_pool = | 1175 base::SequencedWorkerPool* worker_pool = |
1175 content::BrowserThread::GetBlockingPool(); | 1176 content::BrowserThread::GetBlockingPool(); |
1176 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner( | 1177 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner( |
1177 worker_pool->GetSequencedTaskRunnerWithShutdownBehavior( | 1178 worker_pool->GetSequencedTaskRunnerWithShutdownBehavior( |
1178 worker_pool->GetSequenceToken(), | 1179 worker_pool->GetSequenceToken(), |
1179 base::SequencedWorkerPool::SKIP_ON_SHUTDOWN)); | 1180 base::SequencedWorkerPool::SKIP_ON_SHUTDOWN)); |
1180 | 1181 |
1181 gcm_driver_ = gcm::CreateGCMDriverDesktop( | 1182 gcm_driver_ = gcm::CreateGCMDriverDesktop( |
1182 base::WrapUnique(new gcm::GCMClientFactory), local_state(), store_path, | 1183 base::WrapUnique(new gcm::GCMClientFactory), local_state(), store_path, |
1183 system_request_context(), chrome::GetChannel(), | 1184 system_request_context(), chrome::GetChannel(), |
1185 gcm::CategoryForSubtypes(local_state()), | |
Peter Beverloo
2016/07/28 12:34:09
nit: as discussed, name this method GetProductCate
johnme
2016/08/04 17:47:13
Done.
| |
1184 content::BrowserThread::GetTaskRunnerForThread( | 1186 content::BrowserThread::GetTaskRunnerForThread( |
1185 content::BrowserThread::UI), | 1187 content::BrowserThread::UI), |
1186 content::BrowserThread::GetTaskRunnerForThread( | 1188 content::BrowserThread::GetTaskRunnerForThread( |
1187 content::BrowserThread::IO), | 1189 content::BrowserThread::IO), |
1188 blocking_task_runner); | 1190 blocking_task_runner); |
1189 #endif // defined(OS_ANDROID) | 1191 #endif // defined(OS_ANDROID) |
1190 } | 1192 } |
1191 | 1193 |
1192 void BrowserProcessImpl::ApplyDefaultBrowserPolicy() { | 1194 void BrowserProcessImpl::ApplyDefaultBrowserPolicy() { |
1193 if (local_state()->GetBoolean(prefs::kDefaultBrowserSettingEnabled)) { | 1195 if (local_state()->GetBoolean(prefs::kDefaultBrowserSettingEnabled)) { |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1331 } | 1333 } |
1332 | 1334 |
1333 void BrowserProcessImpl::OnAutoupdateTimer() { | 1335 void BrowserProcessImpl::OnAutoupdateTimer() { |
1334 if (CanAutorestartForUpdate()) { | 1336 if (CanAutorestartForUpdate()) { |
1335 DLOG(WARNING) << "Detected update. Restarting browser."; | 1337 DLOG(WARNING) << "Detected update. Restarting browser."; |
1336 RestartBackgroundInstance(); | 1338 RestartBackgroundInstance(); |
1337 } | 1339 } |
1338 } | 1340 } |
1339 | 1341 |
1340 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) | 1342 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) |
OLD | NEW |