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

Unified Diff: components/update_client/updater_state.cc

Issue 2862723002: Add updater state for Mac. (Closed)
Patch Set: Exclude iOS from the updater state logic. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/update_client/BUILD.gn ('k') | components/update_client/updater_state_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/update_client/updater_state.cc
diff --git a/components/update_client/updater_state.cc b/components/update_client/updater_state.cc
index 0c8f414cdbf0ed70151c3219bf07245045d4c326..03598815687736e7c40bc8438855f66080e67076 100644
--- a/components/update_client/updater_state.cc
+++ b/components/update_client/updater_state.cc
@@ -27,16 +27,16 @@ UpdaterState::~UpdaterState() {}
std::unique_ptr<UpdaterState::Attributes> UpdaterState::GetState(
bool is_machine) {
-#if defined(OS_WIN)
+#if defined(OS_WIN) || (defined(OS_MACOSX) && !defined(OS_IOS))
UpdaterState updater_state(is_machine);
updater_state.ReadState();
return base::MakeUnique<Attributes>(updater_state.BuildAttributes());
#else
return nullptr;
-#endif // OS_WIN
+#endif // OS_WIN or Mac
}
-#if defined(OS_WIN)
+#if defined(OS_WIN) || (defined(OS_MACOSX) && !defined(OS_IOS))
void UpdaterState::ReadState() {
is_enterprise_managed_ = IsEnterpriseManaged();
@@ -49,7 +49,7 @@ void UpdaterState::ReadState() {
update_policy_ = GetUpdatePolicy();
#endif // GOOGLE_CHROME_BUILD
}
-#endif // OS_WIN
+#endif // OS_WIN or Mac
UpdaterState::Attributes UpdaterState::BuildAttributes() const {
Attributes attributes;
« no previous file with comments | « components/update_client/BUILD.gn ('k') | components/update_client/updater_state_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698