Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(14)

Side by Side Diff: chrome/browser/browser_process_impl.cc

Issue 2111973002: Add support for GCM subtypes to desktop Instance ID implementation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@iid9push
Patch Set: address most of peter's concerns Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 #include "chrome/browser/safe_browsing/safe_browsing_service.h" 70 #include "chrome/browser/safe_browsing/safe_browsing_service.h"
71 #include "chrome/browser/shell_integration.h" 71 #include "chrome/browser/shell_integration.h"
72 #include "chrome/browser/status_icons/status_tray.h" 72 #include "chrome/browser/status_icons/status_tray.h"
73 #include "chrome/browser/ui/browser_dialogs.h" 73 #include "chrome/browser/ui/browser_dialogs.h"
74 #include "chrome/browser/ui/browser_finder.h" 74 #include "chrome/browser/ui/browser_finder.h"
75 #include "chrome/browser/update_client/chrome_update_query_params_delegate.h" 75 #include "chrome/browser/update_client/chrome_update_query_params_delegate.h"
76 #include "chrome/common/channel_info.h" 76 #include "chrome/common/channel_info.h"
77 #include "chrome/common/chrome_constants.h" 77 #include "chrome/common/chrome_constants.h"
78 #include "chrome/common/chrome_paths.h" 78 #include "chrome/common/chrome_paths.h"
79 #include "chrome/common/chrome_switches.h" 79 #include "chrome/common/chrome_switches.h"
80 #include "chrome/common/chrome_version.h"
80 #include "chrome/common/extensions/chrome_extensions_client.h" 81 #include "chrome/common/extensions/chrome_extensions_client.h"
81 #include "chrome/common/features.h" 82 #include "chrome/common/features.h"
82 #include "chrome/common/pref_names.h" 83 #include "chrome/common/pref_names.h"
83 #include "chrome/common/switch_utils.h" 84 #include "chrome/common/switch_utils.h"
84 #include "chrome/common/url_constants.h" 85 #include "chrome/common/url_constants.h"
85 #include "chrome/installer/util/google_update_constants.h" 86 #include "chrome/installer/util/google_update_constants.h"
86 #include "chrome/installer/util/google_update_settings.h" 87 #include "chrome/installer/util/google_update_settings.h"
87 #include "components/component_updater/component_updater_service.h" 88 #include "components/component_updater/component_updater_service.h"
88 #include "components/gcm_driver/gcm_driver.h" 89 #include "components/gcm_driver/gcm_driver.h"
89 #include "components/metrics/metrics_pref_names.h" 90 #include "components/metrics/metrics_pref_names.h"
(...skipping 1083 matching lines...) Expand 10 before | Expand all | Expand 10 after
1173 CHECK(PathService::Get(chrome::DIR_GLOBAL_GCM_STORE, &store_path)); 1174 CHECK(PathService::Get(chrome::DIR_GLOBAL_GCM_STORE, &store_path));
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(), PRODUCT_SHORTNAME_STRING, chrome::GetChannel(),
1184 content::BrowserThread::GetTaskRunnerForThread( 1185 content::BrowserThread::GetTaskRunnerForThread(
1185 content::BrowserThread::UI), 1186 content::BrowserThread::UI),
1186 content::BrowserThread::GetTaskRunnerForThread( 1187 content::BrowserThread::GetTaskRunnerForThread(
1187 content::BrowserThread::IO), 1188 content::BrowserThread::IO),
1188 blocking_task_runner); 1189 blocking_task_runner);
1189 #endif // defined(OS_ANDROID) 1190 #endif // defined(OS_ANDROID)
1190 } 1191 }
1191 1192
1192 void BrowserProcessImpl::ApplyDefaultBrowserPolicy() { 1193 void BrowserProcessImpl::ApplyDefaultBrowserPolicy() {
1193 if (local_state()->GetBoolean(prefs::kDefaultBrowserSettingEnabled)) { 1194 if (local_state()->GetBoolean(prefs::kDefaultBrowserSettingEnabled)) {
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
1331 } 1332 }
1332 1333
1333 void BrowserProcessImpl::OnAutoupdateTimer() { 1334 void BrowserProcessImpl::OnAutoupdateTimer() {
1334 if (CanAutorestartForUpdate()) { 1335 if (CanAutorestartForUpdate()) {
1335 DLOG(WARNING) << "Detected update. Restarting browser."; 1336 DLOG(WARNING) << "Detected update. Restarting browser.";
1336 RestartBackgroundInstance(); 1337 RestartBackgroundInstance();
1337 } 1338 }
1338 } 1339 }
1339 1340
1340 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) 1341 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS)
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/api/instance_id/instance_id_api.cc » ('j') | components/gcm_driver.gypi » ('J')

Powered by Google App Engine
This is Rietveld 408576698