Change ownership of AuthManager as it's needed by DeviceRegistrationInfo
BUG=25766813
Change-Id: I832e0ee9e440ecc4a754dd6d4dacd3c171fbab21
Reviewed-on: https://weave-review.googlesource.com/1825
Reviewed-by: Alex Vakulenko <avakulenko@google.com>
diff --git a/src/device_registration_info.h b/src/device_registration_info.h
index bacab48..b1b9293 100644
--- a/src/device_registration_info.h
+++ b/src/device_registration_info.h
@@ -41,6 +41,10 @@
class TaskRunner;
}
+namespace privet {
+class AuthManager;
+}
+
extern const char kErrorDomainOAuth2[];
extern const char kErrorDomainGCD[];
extern const char kErrorDomainGCDServer[];
@@ -53,12 +57,13 @@
base::Callback<void(const base::DictionaryValue& response,
ErrorPtr error)>;
- DeviceRegistrationInfo(
- ComponentManager* component_manager,
- std::unique_ptr<Config> config,
- provider::TaskRunner* task_runner,
- provider::HttpClient* http_client,
- provider::Network* network);
+ DeviceRegistrationInfo(ComponentManager* component_manager,
+ std::unique_ptr<Config>
+ config,
+ provider::TaskRunner* task_runner,
+ provider::HttpClient* http_client,
+ provider::Network* network,
+ privet::AuthManager* auth_manager);
~DeviceRegistrationInfo() override;
@@ -337,6 +342,7 @@
bool notification_channel_starting_{false};
provider::Network* network_{nullptr};
+ privet::AuthManager* auth_manager_{nullptr};
// Tracks our GCD state.
GcdState gcd_state_{GcdState::kUnconfigured};