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

Unified Diff: components/update_client/updater_state.cc

Issue 2862723002: Add updater state for Mac. (Closed)
Patch Set: Scoped pointers for NSObject instances; removed a memory leak when reading different type. 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
Index: components/update_client/updater_state.cc
diff --git a/components/update_client/updater_state.cc b/components/update_client/updater_state.cc
index 035e6c2f2302ec3e78fc02b1737488c6b81017da..f7beb25cc18586537585b95695338cca1c91824a 100644
--- a/components/update_client/updater_state.cc
+++ b/components/update_client/updater_state.cc
@@ -23,16 +23,16 @@ UpdaterState::~UpdaterState() {}
std::unique_ptr<UpdaterState::Attributes> UpdaterState::GetState(
bool is_machine) {
-#if defined(OS_WIN)
+#if defined(OS_WIN) || defined(OS_MACOSX)
UpdaterState updater_state(is_machine);
updater_state.ReadState();
return base::MakeUnique<Attributes>(updater_state.BuildAttributes());
#else
return nullptr;
-#endif // OS_WIN
+#endif // OS_WIN and OS_MACOSX
}
-#if defined(OS_WIN)
+#if defined(OS_WIN) || defined(OS_MACOSX)
void UpdaterState::ReadState() {
is_joined_to_domain_ = IsJoinedToDomain();
@@ -45,7 +45,7 @@ void UpdaterState::ReadState() {
update_policy_ = GetUpdatePolicy();
#endif // GOOGLE_CHROME_BUILD
}
-#endif // OS_WIN
+#endif // OS_WIN and OS_MACOSX
UpdaterState::Attributes UpdaterState::BuildAttributes() const {
Attributes attributes;

Powered by Google App Engine
This is Rietveld 408576698