Chromium Code Reviews| Index: chromeos/dbus/fake_auth_policy_client.h |
| diff --git a/chromeos/dbus/fake_auth_policy_client.h b/chromeos/dbus/fake_auth_policy_client.h |
| index 55da46fc5df900290bf1dff08ba538988288b59c..3e8de16fb35a7fcd29d5acec80fb59a6687655c6 100644 |
| --- a/chromeos/dbus/fake_auth_policy_client.h |
| +++ b/chromeos/dbus/fake_auth_policy_client.h |
| @@ -8,6 +8,7 @@ |
| #include <string> |
| #include "base/macros.h" |
| +#include "base/memory/weak_ptr.h" |
| #include "chromeos/dbus/auth_policy_client.h" |
| @@ -25,11 +26,17 @@ class CHROMEOS_EXPORT FakeAuthPolicyClient : public AuthPolicyClient { |
| const std::string& user, |
| int password_fd, |
| const JoinCallback& callback) override; |
| - void RefreshDevicePolicy(const RefreshPolicyCallback& calllback) override; |
| + void RefreshDevicePolicy(const RefreshPolicyCallback& callback) override; |
| void RefreshUserPolicy(const std::string& account_id, |
| - const RefreshPolicyCallback& calllback) override; |
| + const RefreshPolicyCallback& callback) override; |
| private: |
| + static int WriteDevicePolicyFile(); |
|
achuithb
2016/11/30 19:23:34
We prefer functions in the anonymous namespace in
Thiemo Nagel
2016/11/30 20:06:36
Done.
|
| + void OnDevicePolicyFileWritten(const RefreshPolicyCallback& callback, |
| + int bytes_written); |
|
achuithb
2016/11/30 19:23:34
Let's add a function comment.
Thiemo Nagel
2016/11/30 20:06:36
Done.
|
| + |
| + base::WeakPtrFactory<FakeAuthPolicyClient> weak_factory_{this}; |
|
achuithb
2016/11/30 19:23:34
Is this allowed by the c++11 guidelines? Have you
Thiemo Nagel
2016/11/30 20:06:36
We allow Uniform Initialization Syntax and Non-Sta
achuithb
2016/11/30 20:22:49
Personally, I really like this, and would love to
|
| + |
| DISALLOW_COPY_AND_ASSIGN(FakeAuthPolicyClient); |
| }; |