| OLD | NEW | 
|    1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |    1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 
|    2 // Use of this source code is governed by a BSD-style license that can be |    2 // Use of this source code is governed by a BSD-style license that can be | 
|    3 // found in the LICENSE file. |    3 // found in the LICENSE file. | 
|    4  |    4  | 
|    5 #include "chrome/browser/chromeos/policy/device_local_account_policy_service.h" |    5 #include "chrome/browser/chromeos/policy/device_local_account_policy_service.h" | 
|    6  |    6  | 
|    7 #include <vector> |    7 #include <vector> | 
|    8  |    8  | 
|    9 #include "base/bind.h" |    9 #include "base/bind.h" | 
|   10 #include "base/file_util.h" |   10 #include "base/file_util.h" | 
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   58   } |   58   } | 
|   59  |   59  | 
|   60   scoped_refptr<net::URLRequestContextGetter> request_context = |   60   scoped_refptr<net::URLRequestContextGetter> request_context = | 
|   61       new SystemPolicyRequestContext( |   61       new SystemPolicyRequestContext( | 
|   62           system_request_context, |   62           system_request_context, | 
|   63           content::GetUserAgent(GURL( |   63           content::GetUserAgent(GURL( | 
|   64               device_management_service->GetServerUrl()))); |   64               device_management_service->GetServerUrl()))); | 
|   65  |   65  | 
|   66   scoped_ptr<CloudPolicyClient> client( |   66   scoped_ptr<CloudPolicyClient> client( | 
|   67       new CloudPolicyClient(std::string(), std::string(), |   67       new CloudPolicyClient(std::string(), std::string(), | 
 |   68                             kPolicyVerificationKeyHash, | 
|   68                             USER_AFFILIATION_MANAGED, |   69                             USER_AFFILIATION_MANAGED, | 
|   69                             NULL, device_management_service, request_context)); |   70                             NULL, device_management_service, request_context)); | 
|   70   client->SetupRegistration(policy_data->request_token(), |   71   client->SetupRegistration(policy_data->request_token(), | 
|   71                             policy_data->device_id()); |   72                             policy_data->device_id()); | 
|   72   return client.Pass(); |   73   return client.Pass(); | 
|   73 } |   74 } | 
|   74  |   75  | 
|   75 // Get the subdirectory of the cache directory in which force-installed |   76 // Get the subdirectory of the cache directory in which force-installed | 
|   76 // extensions are cached for |account_id|. |   77 // extensions are cached for |account_id|. | 
|   77 std::string GetCacheSubdirectoryForAccountID(const std::string& account_id) { |   78 std::string GetCacheSubdirectoryForAccountID(const std::string& account_id) { | 
| (...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  503         CloudPolicyStore* store) { |  504         CloudPolicyStore* store) { | 
|  504   for (PolicyBrokerMap::iterator it(policy_brokers_.begin()); |  505   for (PolicyBrokerMap::iterator it(policy_brokers_.begin()); | 
|  505        it != policy_brokers_.end(); ++it) { |  506        it != policy_brokers_.end(); ++it) { | 
|  506     if (it->second->core()->store() == store) |  507     if (it->second->core()->store() == store) | 
|  507       return it->second; |  508       return it->second; | 
|  508   } |  509   } | 
|  509   return NULL; |  510   return NULL; | 
|  510 } |  511 } | 
|  511  |  512  | 
|  512 }  // namespace policy |  513 }  // namespace policy | 
| OLD | NEW |