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

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

Issue 16950028: Move file_util::Delete to the base namespace (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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/chromeos/policy/user_cloud_policy_store_chromeos.h" 5 #include "chrome/browser/chromeos/policy/user_cloud_policy_store_chromeos.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after
402 policy_->set_device_id(device_id); 402 policy_->set_device_id(device_id);
403 } 403 }
404 404
405 // Tell the rest of the world that the policy load completed. 405 // Tell the rest of the world that the policy load completed.
406 NotifyStoreLoaded(); 406 NotifyStoreLoaded();
407 } 407 }
408 408
409 // static 409 // static
410 void UserCloudPolicyStoreChromeOS::RemoveLegacyCacheDir( 410 void UserCloudPolicyStoreChromeOS::RemoveLegacyCacheDir(
411 const base::FilePath& dir) { 411 const base::FilePath& dir) {
412 if (file_util::PathExists(dir) && !file_util::Delete(dir, true)) 412 if (file_util::PathExists(dir) && !base::Delete(dir, true))
413 LOG(ERROR) << "Failed to remove cache dir " << dir.value(); 413 LOG(ERROR) << "Failed to remove cache dir " << dir.value();
414 } 414 }
415 415
416 void UserCloudPolicyStoreChromeOS::ReloadPolicyKey( 416 void UserCloudPolicyStoreChromeOS::ReloadPolicyKey(
417 const base::Closure& callback) { 417 const base::Closure& callback) {
418 std::vector<uint8>* key = new std::vector<uint8>(); 418 std::vector<uint8>* key = new std::vector<uint8>();
419 content::BrowserThread::PostBlockingPoolTaskAndReply( 419 content::BrowserThread::PostBlockingPoolTaskAndReply(
420 FROM_HERE, 420 FROM_HERE,
421 base::Bind(&UserCloudPolicyStoreChromeOS::LoadPolicyKey, 421 base::Bind(&UserCloudPolicyStoreChromeOS::LoadPolicyKey,
422 policy_key_path_, 422 policy_key_path_,
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
488 !sanitized_username.empty()) { 488 !sanitized_username.empty()) {
489 policy_key_path_ = user_policy_key_dir_.Append( 489 policy_key_path_ = user_policy_key_dir_.Append(
490 base::StringPrintf(kPolicyKeyFile, sanitized_username.c_str())); 490 base::StringPrintf(kPolicyKeyFile, sanitized_username.c_str()));
491 } else { 491 } else {
492 SampleValidationFailure(VALIDATION_FAILURE_DBUS); 492 SampleValidationFailure(VALIDATION_FAILURE_DBUS);
493 } 493 }
494 ReloadPolicyKey(callback); 494 ReloadPolicyKey(callback);
495 } 495 }
496 496
497 } // namespace policy 497 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698