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

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

Issue 334783002: Componentize component_updater: Move some paths/constants to component. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge origin/master Created 6 years, 6 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 | Annotate | Revision Log
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 <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 #endif 377 #endif
378 378
379 void RegisterComponentsForUpdate(const CommandLine& command_line) { 379 void RegisterComponentsForUpdate(const CommandLine& command_line) {
380 component_updater::ComponentUpdateService* cus = 380 component_updater::ComponentUpdateService* cus =
381 g_browser_process->component_updater(); 381 g_browser_process->component_updater();
382 382
383 // Registration can be before or after cus->Start() so it is ok to post 383 // Registration can be before or after cus->Start() so it is ok to post
384 // a task to the UI thread to do registration once you done the necessary 384 // a task to the UI thread to do registration once you done the necessary
385 // file IO to know you existing component version. 385 // file IO to know you existing component version.
386 #if !defined(OS_CHROMEOS) && !defined(OS_ANDROID) 386 #if !defined(OS_CHROMEOS) && !defined(OS_ANDROID)
387 RegisterRecoveryComponent(cus, g_browser_process->local_state()); 387 base::FilePath recovery_base_dir;
388 if (PathService::Get(chrome::DIR_RECOVERY_BASE, &recovery_base_dir)) {
389 RegisterRecoveryComponent(
390 cus, g_browser_process->local_state(), recovery_base_dir);
waffles 2014/06/18 22:30:37 Can we avoid passing these directories as argument
tommycli 2014/06/19 00:28:40 DIR_RECOVERY_BASE is always DIR_USER_DATA/recovery
391 }
Sorin Jianu 2014/06/19 00:48:21 I second the comment above. It seems we need to ha
tommycli 2014/06/23 21:55:28 Done.
392
388 RegisterPepperFlashComponent(cus); 393 RegisterPepperFlashComponent(cus);
389 RegisterSwiftShaderComponent(cus); 394
395 base::FilePath user_data_dir;
396 if (PathService::Get(chrome::DIR_USER_DATA, &user_data_dir)) {
397 RegisterSwiftShaderComponent(cus, user_data_dir);
398 }
390 #endif 399 #endif
391 400
392 #if !defined(OS_ANDROID) 401 #if !defined(OS_ANDROID)
393 g_browser_process->pnacl_component_installer()->RegisterPnaclComponent( 402 g_browser_process->pnacl_component_installer()->RegisterPnaclComponent(
394 cus, command_line); 403 cus, command_line);
395 #endif 404 #endif
396 405
397 #if !defined(OS_CHROMEOS) && !defined(OS_ANDROID) 406 #if !defined(OS_CHROMEOS) && !defined(OS_ANDROID)
398 RegisterWidevineCdmComponent(cus); 407 RegisterWidevineCdmComponent(cus);
399 #endif 408 #endif
400 409
401 #if !defined(OS_CHROMEOS) && !defined(OS_ANDROID) 410 #if !defined(OS_CHROMEOS) && !defined(OS_ANDROID)
402 // CRLSetFetcher attempts to load a CRL set from either the local disk or 411 // CRLSetFetcher attempts to load a CRL set from either the local disk or
403 // network. 412 // network.
404 if (!command_line.HasSwitch(switches::kDisableCRLSets)) 413 if (!command_line.HasSwitch(switches::kDisableCRLSets))
405 g_browser_process->crl_set_fetcher()->StartInitialLoad(cus); 414 g_browser_process->crl_set_fetcher()->StartInitialLoad(cus);
406 #elif defined(OS_ANDROID) 415 #elif defined(OS_ANDROID)
407 // The CRLSet component was enabled for some releases. This code attempts to 416 // The CRLSet component was enabled for some releases. This code attempts to
408 // delete it from the local disk of those how may have downloaded it. 417 // delete it from the local disk of those how may have downloaded it.
409 g_browser_process->crl_set_fetcher()->DeleteFromDisk(); 418 g_browser_process->crl_set_fetcher()->DeleteFromDisk();
410 #endif 419 #endif
411 420
412 #if defined(CLD2_DYNAMIC_MODE) && defined(CLD2_IS_COMPONENT) 421 #if defined(CLD2_DYNAMIC_MODE) && defined(CLD2_IS_COMPONENT)
413 RegisterCldComponent(cus); 422 base::FilePath cld2_base_dir;
423 if (PathService::Get(chrome::DIR_COMPONENT_CLD2, &cld2_base_dir)) {
424 RegisterCldComponent(
425 cus, cld2_base_dir, base::FilePath(chrome::kCLDDataFilename));
426 }
414 #endif 427 #endif
415 428
416 cus->Start(); 429 cus->Start();
417 } 430 }
418 431
419 #if !defined(OS_ANDROID) 432 #if !defined(OS_ANDROID)
420 bool ProcessSingletonNotificationCallback( 433 bool ProcessSingletonNotificationCallback(
421 const CommandLine& command_line, 434 const CommandLine& command_line,
422 const base::FilePath& current_directory) { 435 const base::FilePath& current_directory) {
423 // Drop the request if the browser process is already in shutdown path. 436 // Drop the request if the browser process is already in shutdown path.
(...skipping 1231 matching lines...) Expand 10 before | Expand all | Expand 10 after
1655 chromeos::CrosSettings::Shutdown(); 1668 chromeos::CrosSettings::Shutdown();
1656 #endif 1669 #endif
1657 #endif 1670 #endif
1658 } 1671 }
1659 1672
1660 // Public members: 1673 // Public members:
1661 1674
1662 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { 1675 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) {
1663 chrome_extra_parts_.push_back(parts); 1676 chrome_extra_parts_.push_back(parts);
1664 } 1677 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698