| Index: chrome/browser/policy/user_policy_identity_strategy.cc
|
| diff --git a/chrome/browser/policy/user_policy_identity_strategy.cc b/chrome/browser/policy/user_policy_identity_strategy.cc
|
| index d20487b1902309cb49a5b5de9adaf92a7e1dbd1c..f539f78472c0158b9efaf591e5a8c51861b6e4c5 100644
|
| --- a/chrome/browser/policy/user_policy_identity_strategy.cc
|
| +++ b/chrome/browser/policy/user_policy_identity_strategy.cc
|
| @@ -9,6 +9,8 @@
|
| #include "chrome/browser/browser_thread.h"
|
| #include "chrome/browser/chromeos/login/user_manager.h"
|
| #include "chrome/browser/net/gaia/token_service.h"
|
| +#include "chrome/browser/policy/proto/device_management_backend.pb.h"
|
| +#include "chrome/browser/policy/proto/device_management_constants.h"
|
| #include "chrome/browser/policy/proto/device_management_local.pb.h"
|
| #include "chrome/browser/profiles/profile.h"
|
| #include "chrome/common/guid.h"
|
| @@ -40,7 +42,7 @@ class UserPolicyIdentityStrategy::TokenCache
|
| const std::string& device_id);
|
|
|
| const base::WeakPtr<UserPolicyIdentityStrategy> identity_strategy_;
|
| - const FilePath& cache_file_;
|
| + const FilePath cache_file_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(TokenCache);
|
| };
|
| @@ -49,7 +51,8 @@ UserPolicyIdentityStrategy::TokenCache::TokenCache(
|
| const base::WeakPtr<UserPolicyIdentityStrategy>& identity_strategy,
|
| const FilePath& cache_file)
|
| : identity_strategy_(identity_strategy),
|
| - cache_file_(cache_file) {}
|
| + cache_file_(cache_file) {
|
| +}
|
|
|
| void UserPolicyIdentityStrategy::TokenCache::Load() {
|
| DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
|
| @@ -157,6 +160,20 @@ std::string UserPolicyIdentityStrategy::GetDeviceID() {
|
| return device_id_;
|
| }
|
|
|
| +std::string UserPolicyIdentityStrategy::GetMachineID() {
|
| + return device_id_;
|
| +}
|
| +
|
| +em::DeviceRegisterRequest_Type
|
| +UserPolicyIdentityStrategy::GetPolicyRegisterType() {
|
| + return em::DeviceRegisterRequest::USER;
|
| +}
|
| +
|
| +std::string UserPolicyIdentityStrategy::GetPolicyType() {
|
| + return kChromeUserPolicyType;
|
| +}
|
| +
|
| +
|
| bool UserPolicyIdentityStrategy::GetCredentials(std::string* username,
|
| std::string* auth_token) {
|
| *username = GetCurrentUser();
|
|
|