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

Unified Diff: chrome/browser/component_updater/cros_component_installer.cc

Issue 2744453003: Mount image upon component installed (Closed)
Patch Set: incremental change Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chromeos/dbus/dbus_method_call_status.h » ('j') | chromeos/dbus/dbus_method_call_status.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/component_updater/cros_component_installer.cc
diff --git a/chrome/browser/component_updater/cros_component_installer.cc b/chrome/browser/component_updater/cros_component_installer.cc
index 0aa088658e3f12ec5aad14c5e7bc90cbbd48943f..b7fba9f3b12e02e70cd1b20074de37ab1f4a4cc3 100644
--- a/chrome/browser/component_updater/cros_component_installer.cc
+++ b/chrome/browser/component_updater/cros_component_installer.cc
@@ -19,8 +19,31 @@ using content::BrowserThread;
namespace component_updater {
#if defined(OS_CHROMEOS)
+void LogLoadResult(chromeos::DBusMethodCallStatus call_status,
hashimoto 2017/03/10 04:27:22 Does this code compile? Seems this callback lacks
xiaochu 2017/03/10 16:49:00 it is a StringDBusMethodCallback type. And a new i
+ const std::string& result) {
+ DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
+ if (call_status != chromeos::DBUS_METHOD_CALL_SUCCESS) {
+ DVLOG(1) << "Call to imageloader service failed.";
+ return;
+ }
+ if (result.empty()) {
+ DVLOG(1) << "Component load failed";
+ return;
+ }
+}
+void ImageLoaderLoad(const std::string& name) {
+ DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
+ chromeos::ImageLoaderClient* loader =
+ chromeos::DBusThreadManager::Get()->GetImageLoaderClient();
+ if (loader) {
+ loader->LoadComponent(name, base::Bind(&LogLoadResult));
+ } else {
+ DVLOG(1) << "Failed to get ImageLoaderClient object.";
+ }
+}
void LogRegistrationResult(chromeos::DBusMethodCallStatus call_status,
- bool result) {
+ bool result,
+ const std::string& name) {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
if (call_status != chromeos::DBUS_METHOD_CALL_SUCCESS) {
DVLOG(1) << "Call to imageloader service failed.";
@@ -30,6 +53,7 @@ void LogRegistrationResult(chromeos::DBusMethodCallStatus call_status,
DVLOG(1) << "Component registration failed";
return;
}
+ ImageLoaderLoad(name);
}
void ImageLoaderRegistration(const std::string& version,
const base::FilePath& install_dir,
« no previous file with comments | « no previous file | chromeos/dbus/dbus_method_call_status.h » ('j') | chromeos/dbus/dbus_method_call_status.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698