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

Side by Side Diff: src/platform/update_engine/omaha_response_handler_action.h

Issue 2037002: AU: DBus support. (Closed) Base URL: ssh://git@chromiumos-git/chromeos
Patch Set: fixes for review Created 10 years, 7 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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 #ifndef CHROMEOS_PLATFORM_UPDATE_ENGINE_OMAHA_RESPONSE_HANDLER_ACTION_H__ 5 #ifndef CHROMEOS_PLATFORM_UPDATE_ENGINE_OMAHA_RESPONSE_HANDLER_ACTION_H__
6 #define CHROMEOS_PLATFORM_UPDATE_ENGINE_OMAHA_RESPONSE_HANDLER_ACTION_H__ 6 #define CHROMEOS_PLATFORM_UPDATE_ENGINE_OMAHA_RESPONSE_HANDLER_ACTION_H__
7 7
8 #include <string> 8 #include <string>
9 #include "update_engine/action.h" 9 #include "update_engine/action.h"
10 #include "update_engine/install_plan.h" 10 #include "update_engine/install_plan.h"
(...skipping 25 matching lines...) Expand all
36 // This is a synchronous action, and thus TerminateProcessing() should 36 // This is a synchronous action, and thus TerminateProcessing() should
37 // never be called 37 // never be called
38 void TerminateProcessing() { CHECK(false); } 38 void TerminateProcessing() { CHECK(false); }
39 39
40 // For unit-testing 40 // For unit-testing
41 void set_boot_device(const std::string& boot_device) { 41 void set_boot_device(const std::string& boot_device) {
42 boot_device_ = boot_device; 42 boot_device_ = boot_device;
43 } 43 }
44 44
45 bool GotNoUpdateResponse() const { return got_no_update_response_; } 45 bool GotNoUpdateResponse() const { return got_no_update_response_; }
46 const InstallPlan& install_plan() const { return install_plan_; }
46 47
47 // Debugging/logging 48 // Debugging/logging
48 static std::string StaticType() { return "OmahaResponseHandlerAction"; } 49 static std::string StaticType() { return "OmahaResponseHandlerAction"; }
49 std::string Type() const { return StaticType(); } 50 std::string Type() const { return StaticType(); }
50 51
51 private: 52 private:
52 // Assumes you want to install on the "other" device, where the other 53 // Assumes you want to install on the "other" device, where the other
53 // device is what you get if you swap 1 for 2 or 3 for 4 or vice versa 54 // device is what you get if you swap 1 for 2 or 3 for 4 or vice versa
54 // for the number at the end of the boot device. E.g., /dev/sda1 -> /dev/sda2 55 // for the number at the end of the boot device. E.g., /dev/sda1 -> /dev/sda2
55 // or /dev/sda4 -> /dev/sda3 56 // or /dev/sda4 -> /dev/sda3
56 static bool GetInstallDev(const std::string& boot_dev, 57 static bool GetInstallDev(const std::string& boot_dev,
57 std::string* install_dev); 58 std::string* install_dev);
58 59
59 // set to non-empty in unit tests 60 // set to non-empty in unit tests
60 std::string boot_device_; 61 std::string boot_device_;
61 62
63 // The install plan, if we have an update.
64 InstallPlan install_plan_;
65
62 // True only if we got a response and the response said no updates 66 // True only if we got a response and the response said no updates
63 bool got_no_update_response_; 67 bool got_no_update_response_;
64 68
65 DISALLOW_COPY_AND_ASSIGN(OmahaResponseHandlerAction); 69 DISALLOW_COPY_AND_ASSIGN(OmahaResponseHandlerAction);
66 }; 70 };
67 71
68 } // namespace chromeos_update_engine 72 } // namespace chromeos_update_engine
69 73
70 #endif // CHROMEOS_PLATFORM_UPDATE_ENGINE_OMAHA_RESPONSE_HANDLER_ACTION_H__ 74 #endif // CHROMEOS_PLATFORM_UPDATE_ENGINE_OMAHA_RESPONSE_HANDLER_ACTION_H__
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698