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

Side by Side Diff: chrome/browser/component_updater/cros_component_installer.cc

Issue 2898063002: Hold cros_component_installers in browser_process. (Closed)
Patch Set: remove dead code Created 3 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
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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/component_updater/cros_component_installer.h" 5 #include "chrome/browser/component_updater/cros_component_installer.h"
6 #include "base/task_scheduler/post_task.h" 6 #include "base/task_scheduler/post_task.h"
7 #include "chrome/browser/browser_process.h" 7 #include "chrome/browser/browser_process.h"
8 #include "chrome/browser/component_updater/component_installer_errors.h" 8 #include "chrome/browser/component_updater/component_installer_errors.h"
9 #include "components/component_updater/component_updater_paths.h" 9 #include "components/component_updater/component_updater_paths.h"
10 #include "components/crx_file/id_util.h" 10 #include "components/crx_file/id_util.h"
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 } 88 }
89 BrowserThread::PostTask( 89 BrowserThread::PostTask(
90 BrowserThread::UI, FROM_HERE, 90 BrowserThread::UI, FROM_HERE,
91 base::Bind(&ImageLoaderRegistration, version, install_dir, name)); 91 base::Bind(&ImageLoaderRegistration, version, install_dir, name));
92 return update_client::CrxInstaller::Result(update_client::InstallError::NONE); 92 return update_client::CrxInstaller::Result(update_client::InstallError::NONE);
93 } 93 }
94 94
95 void CrOSComponentInstallerTraits::ComponentReady( 95 void CrOSComponentInstallerTraits::ComponentReady(
96 const base::Version& version, 96 const base::Version& version,
97 const base::FilePath& path, 97 const base::FilePath& path,
98 std::unique_ptr<base::DictionaryValue> manifest) {} 98 std::unique_ptr<base::DictionaryValue> manifest) {
99 g_browser_process->platform_part()->AddCompatibleCrOSComponent(GetName());
100 }
99 101
100 bool CrOSComponentInstallerTraits::VerifyInstallation( 102 bool CrOSComponentInstallerTraits::VerifyInstallation(
101 const base::DictionaryValue& manifest, 103 const base::DictionaryValue& manifest,
102 const base::FilePath& install_dir) const { 104 const base::FilePath& install_dir) const {
103 return true; 105 return true;
104 } 106 }
105 107
106 base::FilePath CrOSComponentInstallerTraits::GetRelativeInstallDir() const { 108 base::FilePath CrOSComponentInstallerTraits::GetRelativeInstallDir() const {
107 return base::FilePath(name); 109 return base::FilePath(name);
108 } 110 }
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 chromeos::DBusThreadManager::Get()->GetImageLoaderClient(); 208 chromeos::DBusThreadManager::Get()->GetImageLoaderClient();
207 if (loader) { 209 if (loader) {
208 loader->LoadComponent(name, base::Bind(&MountResult, mount_callback)); 210 loader->LoadComponent(name, base::Bind(&MountResult, mount_callback));
209 } else { 211 } else {
210 DVLOG(1) << "Failed to get ImageLoaderClient object."; 212 DVLOG(1) << "Failed to get ImageLoaderClient object.";
211 } 213 }
212 } 214 }
213 #endif // defined(OS_CHROMEOS 215 #endif // defined(OS_CHROMEOS
214 216
215 } // namespace component_updater 217 } // namespace component_updater
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698