Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(56)

Side by Side Diff: chrome/browser/policy/user_cloud_policy_store_chromeos.cc

Issue 10828032: Add DeviceSettingsService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Oops. Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/policy/user_cloud_policy_store_chromeos.h" 5 #include "chrome/browser/policy/user_cloud_policy_store_chromeos.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 273
274 void UserCloudPolicyStoreChromeOS::Validate( 274 void UserCloudPolicyStoreChromeOS::Validate(
275 scoped_ptr<em::PolicyFetchResponse> policy, 275 scoped_ptr<em::PolicyFetchResponse> policy,
276 const UserCloudPolicyValidator::CompletionCallback& callback) { 276 const UserCloudPolicyValidator::CompletionCallback& callback) {
277 // Configure the validator. 277 // Configure the validator.
278 UserCloudPolicyValidator* validator = 278 UserCloudPolicyValidator* validator =
279 UserCloudPolicyValidator::Create(policy.Pass(), callback); 279 UserCloudPolicyValidator::Create(policy.Pass(), callback);
280 validator->ValidateUsername( 280 validator->ValidateUsername(
281 chromeos::UserManager::Get()->GetLoggedInUser().email()); 281 chromeos::UserManager::Get()->GetLoggedInUser().email());
282 validator->ValidatePolicyType(dm_protocol::kChromeUserPolicyType); 282 validator->ValidatePolicyType(dm_protocol::kChromeUserPolicyType);
283 validator->ValidateAgainstCurrentPolicy(policy_.get()); 283 validator->ValidateAgainstCurrentPolicy(policy_.get(), false);
284 validator->ValidatePayload(); 284 validator->ValidatePayload();
285 285
286 // TODO(mnissler): Do a signature check here as well. The key is stored by 286 // TODO(mnissler): Do a signature check here as well. The key is stored by
287 // session_manager in the root-owned cryptohome area, which is currently 287 // session_manager in the root-owned cryptohome area, which is currently
288 // inaccessible to Chrome though. 288 // inaccessible to Chrome though.
289 289
290 // Start validation. 290 // Start validation.
291 validator->StartValidation(); 291 validator->StartValidation();
292 } 292 }
293 293
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 NotifyStoreLoaded(); 346 NotifyStoreLoaded();
347 } 347 }
348 348
349 // static 349 // static
350 void UserCloudPolicyStoreChromeOS::RemoveLegacyCacheDir(const FilePath& dir) { 350 void UserCloudPolicyStoreChromeOS::RemoveLegacyCacheDir(const FilePath& dir) {
351 if (file_util::PathExists(dir) && !file_util::Delete(dir, true)) 351 if (file_util::PathExists(dir) && !file_util::Delete(dir, true))
352 LOG(ERROR) << "Failed to remove cache dir " << dir.value(); 352 LOG(ERROR) << "Failed to remove cache dir " << dir.value();
353 } 353 }
354 354
355 } // namespace policy 355 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698