Add {Get,Set}CohortHint interface.

Export the "cohort hint" getter and setter in the client interfaces
(D-Bus and Binder). The cohort hint is sent to Omaha on every update
check request but can be ignored and/or reset by Omaha on every
response.

Other minor linter fixes to the affected files.

Bug: 31740109
Test: Build with D-Bus and with Binder.

(cherry picked from commit 5b5fa8b412312a41cfd4d7ab475b54d4f730ed2a)

Change-Id: Ieb40c2d4bbe2ce926d54b6348b22f2840d8327db
Reviewed-on: https://chromium-review.googlesource.com/395206
Commit-Ready: Alex Deymo <deymo@chromium.org>
Tested-by: Alex Deymo <deymo@chromium.org>
Reviewed-by: Christopher Book <cbook@chromium.org>
diff --git a/client_library/client_binder.cc b/client_library/client_binder.cc
index 6a61722..e98c225 100644
--- a/client_library/client_binder.cc
+++ b/client_library/client_binder.cc
@@ -73,6 +73,20 @@
   return true;
 }
 
+bool BinderUpdateEngineClient::SetCohortHint(const string& in_cohort_hint) {
+  return service_->SetCohortHint(String16{in_cohort_hint.c_str()}).isOk();
+}
+
+bool BinderUpdateEngineClient::GetCohortHint(string* out_cohort_hint) const {
+  String16 out_as_string16;
+
+  if (!service_->GetCohortHint(&out_as_string16).isOk())
+    return false;
+
+  *out_cohort_hint = String8{out_as_string16}.string();
+  return true;
+}
+
 bool BinderUpdateEngineClient::SetUpdateOverCellularPermission(bool allowed) {
   return service_->SetUpdateOverCellularPermission(allowed).isOk();
 }