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

Side by Side Diff: chrome/browser/browsing_data/browsing_data_remover.cc

Issue 1165323004: We should use UserID object to identify users instead of username. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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
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/browsing_data/browsing_data_remover.h" 5 #include "chrome/browser/browsing_data/browsing_data_remover.h"
6 6
7 #include <map> 7 #include <map>
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 10
(...skipping 685 matching lines...) Expand 10 before | Expand all | Expand 10 after
696 #if defined(OS_CHROMEOS) 696 #if defined(OS_CHROMEOS)
697 // On Chrome OS, also delete any content protection platform keys. 697 // On Chrome OS, also delete any content protection platform keys.
698 const user_manager::User* user = 698 const user_manager::User* user =
699 chromeos::ProfileHelper::Get()->GetUserByProfile(profile_); 699 chromeos::ProfileHelper::Get()->GetUserByProfile(profile_);
700 if (!user) { 700 if (!user) {
701 LOG(WARNING) << "Failed to find user for current profile."; 701 LOG(WARNING) << "Failed to find user for current profile.";
702 } else { 702 } else {
703 chromeos::DBusThreadManager::Get()->GetCryptohomeClient()-> 703 chromeos::DBusThreadManager::Get()->GetCryptohomeClient()->
704 TpmAttestationDeleteKeys( 704 TpmAttestationDeleteKeys(
705 chromeos::attestation::KEY_USER, 705 chromeos::attestation::KEY_USER,
706 user->email(), 706 user->GetUserID(),
707 chromeos::attestation::kContentProtectionKeyPrefix, 707 chromeos::attestation::kContentProtectionKeyPrefix,
708 base::Bind(&BrowsingDataRemover::OnClearPlatformKeys, 708 base::Bind(&BrowsingDataRemover::OnClearPlatformKeys,
709 base::Unretained(this))); 709 base::Unretained(this)));
710 waiting_for_clear_platform_keys_ = true; 710 waiting_for_clear_platform_keys_ = true;
711 } 711 }
712 #endif 712 #endif
713 } 713 }
714 #endif 714 #endif
715 715
716 // Remove omnibox zero-suggest cache results. 716 // Remove omnibox zero-suggest cache results.
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after
1090 waiting_for_clear_domain_reliability_monitor_ = false; 1090 waiting_for_clear_domain_reliability_monitor_ = false;
1091 NotifyAndDeleteIfDone(); 1091 NotifyAndDeleteIfDone();
1092 } 1092 }
1093 1093
1094 // static 1094 // static
1095 BrowsingDataRemover::CallbackSubscription 1095 BrowsingDataRemover::CallbackSubscription
1096 BrowsingDataRemover::RegisterOnBrowsingDataRemovedCallback( 1096 BrowsingDataRemover::RegisterOnBrowsingDataRemovedCallback(
1097 const BrowsingDataRemover::Callback& callback) { 1097 const BrowsingDataRemover::Callback& callback) {
1098 return GetOnBrowsingDataRemovedCallbacks()->Add(callback); 1098 return GetOnBrowsingDataRemovedCallbacks()->Add(callback);
1099 } 1099 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698