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

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

Issue 2686863004: Simplify the registration of the Chrome Recovery component. (Closed)
Patch Set: fix broken chromium build Created 3 years, 10 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
« no previous file with comments | « no previous file | chrome/browser/component_updater/recovery_component_installer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/chrome_browser_main.h" 5 #include "chrome/browser/chrome_browser_main.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <set> 10 #include <set>
(...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after
465 } 465 }
466 466
467 #if defined(OS_MACOSX) 467 #if defined(OS_MACOSX)
468 OSStatus KeychainCallback(SecKeychainEvent keychain_event, 468 OSStatus KeychainCallback(SecKeychainEvent keychain_event,
469 SecKeychainCallbackInfo* info, void* context) { 469 SecKeychainCallbackInfo* info, void* context) {
470 return noErr; 470 return noErr;
471 } 471 }
472 #endif // defined(OS_MACOSX) 472 #endif // defined(OS_MACOSX)
473 473
474 void RegisterComponentsForUpdate() { 474 void RegisterComponentsForUpdate() {
475 component_updater::ComponentUpdateService* cus = 475 const auto cus = g_browser_process->component_updater();
476 g_browser_process->component_updater();
477 476
478 // Registration can be before or after cus->Start() so it is ok to post
479 // a task to the UI thread to do registration once you done the necessary
480 // file IO to know you existing component version.
481 #if !defined(OS_ANDROID)
482 #if !defined(OS_CHROMEOS)
483 if (base::FeatureList::IsEnabled(features::kImprovedRecoveryComponent)) 477 if (base::FeatureList::IsEnabled(features::kImprovedRecoveryComponent))
484 RegisterRecoveryImprovedComponent(cus, g_browser_process->local_state()); 478 RegisterRecoveryImprovedComponent(cus, g_browser_process->local_state());
485 else 479 else
486 RegisterRecoveryComponent(cus, g_browser_process->local_state()); 480 RegisterRecoveryComponent(cus, g_browser_process->local_state());
487 #endif // !defined(OS_CHROMEOS) 481
482 #if !defined(OS_ANDROID)
488 RegisterPepperFlashComponent(cus); 483 RegisterPepperFlashComponent(cus);
489 #if !defined(OS_CHROMEOS) 484 #if !defined(OS_CHROMEOS)
490 RegisterSwiftShaderComponent(cus); 485 RegisterSwiftShaderComponent(cus);
491 RegisterWidevineCdmComponent(cus); 486 RegisterWidevineCdmComponent(cus);
492 #endif // !defined(OS_CHROMEOS) 487 #endif // !defined(OS_CHROMEOS)
493 #endif // !defined(OS_ANDROID) 488 #endif // !defined(OS_ANDROID)
494 489
495 #if !defined(DISABLE_NACL) && !defined(OS_ANDROID) 490 #if !defined(DISABLE_NACL) && !defined(OS_ANDROID)
496 #if defined(OS_CHROMEOS) 491 #if defined(OS_CHROMEOS)
497 // PNaCl on Chrome OS is on rootfs and there is no need to download it. But 492 // PNaCl on Chrome OS is on rootfs and there is no need to download it. But
(...skipping 1624 matching lines...) Expand 10 before | Expand all | Expand 10 after
2122 chromeos::CrosSettings::Shutdown(); 2117 chromeos::CrosSettings::Shutdown();
2123 #endif // defined(OS_CHROMEOS) 2118 #endif // defined(OS_CHROMEOS)
2124 #endif // defined(OS_ANDROID) 2119 #endif // defined(OS_ANDROID)
2125 } 2120 }
2126 2121
2127 // Public members: 2122 // Public members:
2128 2123
2129 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { 2124 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) {
2130 chrome_extra_parts_.push_back(parts); 2125 chrome_extra_parts_.push_back(parts);
2131 } 2126 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/component_updater/recovery_component_installer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698