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

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

Issue 1693383003: ChromeOS cryptohome should be able to use gaia id as user identifier. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed unit tests. Created 4 years, 9 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
« no previous file with comments | « no previous file | chrome/browser/chromeos/app_mode/app_session.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 #include "chrome/browser/android/webapps/webapp_registry.h" 82 #include "chrome/browser/android/webapps/webapp_registry.h"
83 #include "chrome/browser/precache/precache_manager_factory.h" 83 #include "chrome/browser/precache/precache_manager_factory.h"
84 #include "components/offline_pages/offline_page_feature.h" 84 #include "components/offline_pages/offline_page_feature.h"
85 #include "components/offline_pages/offline_page_model.h" 85 #include "components/offline_pages/offline_page_model.h"
86 #include "components/precache/content/precache_manager.h" 86 #include "components/precache/content/precache_manager.h"
87 #endif 87 #endif
88 88
89 #if defined(OS_CHROMEOS) 89 #if defined(OS_CHROMEOS)
90 #include "chrome/browser/chromeos/profiles/profile_helper.h" 90 #include "chrome/browser/chromeos/profiles/profile_helper.h"
91 #include "chromeos/attestation/attestation_constants.h" 91 #include "chromeos/attestation/attestation_constants.h"
92 #include "chromeos/cryptohome/cryptohome_parameters.h"
92 #include "chromeos/dbus/cryptohome_client.h" 93 #include "chromeos/dbus/cryptohome_client.h"
93 #include "chromeos/dbus/dbus_thread_manager.h" 94 #include "chromeos/dbus/dbus_thread_manager.h"
94 #include "components/user_manager/user.h" 95 #include "components/user_manager/user.h"
95 #endif 96 #endif
96 97
97 #if defined(ENABLE_EXTENSIONS) 98 #if defined(ENABLE_EXTENSIONS)
98 #include "chrome/browser/extensions/activity_log/activity_log.h" 99 #include "chrome/browser/extensions/activity_log/activity_log.h"
99 #include "extensions/browser/extension_prefs.h" 100 #include "extensions/browser/extension_prefs.h"
100 #endif 101 #endif
101 102
(...skipping 777 matching lines...) Expand 10 before | Expand all | Expand 10 after
879 #if defined(OS_CHROMEOS) 880 #if defined(OS_CHROMEOS)
880 // On Chrome OS, also delete any content protection platform keys. 881 // On Chrome OS, also delete any content protection platform keys.
881 const user_manager::User* user = 882 const user_manager::User* user =
882 chromeos::ProfileHelper::Get()->GetUserByProfile(profile_); 883 chromeos::ProfileHelper::Get()->GetUserByProfile(profile_);
883 if (!user) { 884 if (!user) {
884 LOG(WARNING) << "Failed to find user for current profile."; 885 LOG(WARNING) << "Failed to find user for current profile.";
885 } else { 886 } else {
886 chromeos::DBusThreadManager::Get() 887 chromeos::DBusThreadManager::Get()
887 ->GetCryptohomeClient() 888 ->GetCryptohomeClient()
888 ->TpmAttestationDeleteKeys( 889 ->TpmAttestationDeleteKeys(
889 chromeos::attestation::KEY_USER, user->email(), 890 chromeos::attestation::KEY_USER,
891 cryptohome::Identification(user->GetAccountId()),
890 chromeos::attestation::kContentProtectionKeyPrefix, 892 chromeos::attestation::kContentProtectionKeyPrefix,
891 base::Bind(&BrowsingDataRemover::OnClearPlatformKeys, 893 base::Bind(&BrowsingDataRemover::OnClearPlatformKeys,
892 weak_ptr_factory_.GetWeakPtr())); 894 weak_ptr_factory_.GetWeakPtr()));
893 waiting_for_clear_platform_keys_ = true; 895 waiting_for_clear_platform_keys_ = true;
894 } 896 }
895 #endif 897 #endif
896 } 898 }
897 #endif 899 #endif
898 900
899 // Remove omnibox zero-suggest cache results. 901 // Remove omnibox zero-suggest cache results.
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
1223 waiting_for_clear_domain_reliability_monitor_ = false; 1225 waiting_for_clear_domain_reliability_monitor_ = false;
1224 NotifyIfDone(); 1226 NotifyIfDone();
1225 } 1227 }
1226 1228
1227 // static 1229 // static
1228 BrowsingDataRemover::CallbackSubscription 1230 BrowsingDataRemover::CallbackSubscription
1229 BrowsingDataRemover::RegisterOnBrowsingDataRemovedCallback( 1231 BrowsingDataRemover::RegisterOnBrowsingDataRemovedCallback(
1230 const BrowsingDataRemover::Callback& callback) { 1232 const BrowsingDataRemover::Callback& callback) {
1231 return GetOnBrowsingDataRemovedCallbacks()->Add(callback); 1233 return GetOnBrowsingDataRemovedCallbacks()->Add(callback);
1232 } 1234 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/app_mode/app_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698