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

Side by Side Diff: components/update_client/updater_state.h

Issue 2862723002: Add updater state for Mac. (Closed)
Patch Set: Added check for nil version in the info.plist. More comments. Created 3 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) 2016 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2016 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 COMPONENTS_UPDATE_CLIENT_UPDATER_STATE_H_ 5 #ifndef COMPONENTS_UPDATE_CLIENT_UPDATER_STATE_H_
6 #define COMPONENTS_UPDATE_CLIENT_UPDATER_STATE_H_ 6 #define COMPONENTS_UPDATE_CLIENT_UPDATER_STATE_H_
7 7
8 #include <map> 8 #include <map>
9 #include <memory> 9 #include <memory>
10 #include <string> 10 #include <string>
(...skipping 29 matching lines...) Expand all
40 40
41 // Builds the map of state attributes by serializing this object state. 41 // Builds the map of state attributes by serializing this object state.
42 Attributes BuildAttributes() const; 42 Attributes BuildAttributes() const;
43 43
44 static std::string GetUpdaterName(); 44 static std::string GetUpdaterName();
45 static base::Version GetUpdaterVersion(bool is_machine); 45 static base::Version GetUpdaterVersion(bool is_machine);
46 static bool IsAutoupdateCheckEnabled(); 46 static bool IsAutoupdateCheckEnabled();
47 static bool IsJoinedToDomain(); 47 static bool IsJoinedToDomain();
48 static base::Time GetUpdaterLastStartedAU(bool is_machine); 48 static base::Time GetUpdaterLastStartedAU(bool is_machine);
49 static base::Time GetUpdaterLastChecked(bool is_machine); 49 static base::Time GetUpdaterLastChecked(bool is_machine);
50 #if defined(OS_WIN)
Sorin Jianu 2017/05/04 19:53:58 can we avoid conditional compilation in this file?
borisv 2017/05/04 22:19:27 We have to user conditional anyway anyway for the
Sorin Jianu 2017/05/04 22:50:48 wchar_t is a standard type. Also, I can change th
50 static base::Time GetUpdaterTimeValue(bool is_machine, 51 static base::Time GetUpdaterTimeValue(bool is_machine,
51 const wchar_t* value_name); 52 const wchar_t* value_name);
53 #else
54 static base::Time GetUpdaterTimeValue(const char* value_name);
55 #endif
52 static int GetUpdatePolicy(); 56 static int GetUpdatePolicy();
53 57
54 static std::string NormalizeTimeDelta(const base::TimeDelta& delta); 58 static std::string NormalizeTimeDelta(const base::TimeDelta& delta);
55 59
56 bool is_machine_ = false; 60 bool is_machine_ = false;
57 std::string updater_name_; 61 std::string updater_name_;
58 base::Version updater_version_; 62 base::Version updater_version_;
59 base::Time last_autoupdate_started_; 63 base::Time last_autoupdate_started_;
60 base::Time last_checked_; 64 base::Time last_checked_;
61 bool is_joined_to_domain_ = false; 65 bool is_joined_to_domain_ = false;
62 bool is_autoupdate_check_enabled_ = false; 66 bool is_autoupdate_check_enabled_ = false;
63 int update_policy_ = 0; 67 int update_policy_ = 0;
64 }; 68 };
65 69
66 } // namespace update_client 70 } // namespace update_client
67 71
68 #endif // COMPONENTS_UPDATE_CLIENT_UPDATER_STATE_H_ 72 #endif // COMPONENTS_UPDATE_CLIENT_UPDATER_STATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698