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

Side by Side Diff: chrome/installer/util/callback_work_item.h

Issue 10916018: Force COM machinery to notice that the path to the DelegateExecute verb handler has changed. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_INSTALLER_UTIL_CALLBACK_WORK_ITEM_H_
6 #define CHROME_INSTALLER_UTIL_CALLBACK_WORK_ITEM_H_
7
8 #include "base/callback.h"
9 #include "base/gtest_prod_util.h"
10 #include "chrome/installer/util/work_item.h"
11
12 // A work item that invokes a callback on Do() and Rollback().
robertshield 2012/08/30 17:52:43 Could you add a comment that gives an example of u
grt (UTC plus 2) 2012/08/30 18:21:50 Done.
13 class CallbackWorkItem : public WorkItem {
14 public:
15 virtual ~CallbackWorkItem();
16
17 virtual bool Do() OVERRIDE;
18 virtual void Rollback() OVERRIDE;
19
20 bool IsRollback() const;
21
22 private:
23 friend class WorkItem;
24
25 enum RollState {
26 RS_UNDEFINED,
27 RS_FORWARD,
28 RS_BACKWARD,
29 };
30
31 CallbackWorkItem(
32 base::Callback<bool(const CallbackWorkItem&)> callback);
33
34 base::Callback<bool(const CallbackWorkItem&)> callback_;
35 RollState roll_state_;
36
37 FRIEND_TEST_ALL_PREFIXES(CallbackWorkItemTest, TestFailure);
38 FRIEND_TEST_ALL_PREFIXES(CallbackWorkItemTest, TestForwardBackward);
39 };
40
41 #endif // CHROME_INSTALLER_UTIL_CALLBACK_WORK_ITEM_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698