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

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

Issue 1497193002: Remove all the ephemeral apps code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Tests Created 5 years 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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
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/dbus/cryptohome_client.h" 92 #include "chromeos/dbus/cryptohome_client.h"
93 #include "chromeos/dbus/dbus_thread_manager.h" 93 #include "chromeos/dbus/dbus_thread_manager.h"
94 #include "components/user_manager/user.h" 94 #include "components/user_manager/user.h"
95 #endif 95 #endif
96 96
97 #if defined(ENABLE_EXTENSIONS) 97 #if defined(ENABLE_EXTENSIONS)
98 #include "chrome/browser/apps/ephemeral_app_service.h"
99 #include "chrome/browser/extensions/activity_log/activity_log.h" 98 #include "chrome/browser/extensions/activity_log/activity_log.h"
100 #include "chrome/browser/extensions/extension_service.h" 99 #include "chrome/browser/extensions/extension_service.h"
101 #include "chrome/browser/extensions/extension_special_storage_policy.h" 100 #include "chrome/browser/extensions/extension_special_storage_policy.h"
102 #include "extensions/browser/extension_prefs.h" 101 #include "extensions/browser/extension_prefs.h"
103 #endif 102 #endif
104 103
105 #if defined(ENABLE_WEBRTC) 104 #if defined(ENABLE_WEBRTC)
106 #include "chrome/browser/media/webrtc_log_list.h" 105 #include "chrome/browser/media/webrtc_log_list.h"
107 #include "chrome/browser/media/webrtc_log_util.h" 106 #include "chrome/browser/media/webrtc_log_util.h"
108 #endif 107 #endif
(...skipping 577 matching lines...) Expand 10 before | Expand all | Expand 10 after
686 prerender::PrerenderManager::CLEAR_PRERENDER_CONTENTS); 685 prerender::PrerenderManager::CLEAR_PRERENDER_CONTENTS);
687 } 686 }
688 687
689 // Tell the shader disk cache to clear. 688 // Tell the shader disk cache to clear.
690 content::RecordAction(UserMetricsAction("ClearBrowsingData_ShaderCache")); 689 content::RecordAction(UserMetricsAction("ClearBrowsingData_ShaderCache"));
691 storage_partition_remove_mask |= 690 storage_partition_remove_mask |=
692 content::StoragePartition::REMOVE_DATA_MASK_SHADER_CACHE; 691 content::StoragePartition::REMOVE_DATA_MASK_SHADER_CACHE;
693 692
694 storage_partition_remove_mask |= 693 storage_partition_remove_mask |=
695 content::StoragePartition::REMOVE_DATA_MASK_WEBRTC_IDENTITY; 694 content::StoragePartition::REMOVE_DATA_MASK_WEBRTC_IDENTITY;
696
697 #if defined(ENABLE_EXTENSIONS)
698 // Clear the ephemeral apps cache. This is nullptr while testing. OTR
699 // Profile has neither apps nor an ExtensionService, so ClearCachedApps
700 // fails.
701 EphemeralAppService* ephemeral_app_service =
702 EphemeralAppService::Get(profile_);
703 if (ephemeral_app_service && !profile_->IsOffTheRecord())
704 ephemeral_app_service->ClearCachedApps();
705 #endif
706 } 695 }
707 696
708 if (remove_mask & REMOVE_WEBRTC_IDENTITY) { 697 if (remove_mask & REMOVE_WEBRTC_IDENTITY) {
709 storage_partition_remove_mask |= 698 storage_partition_remove_mask |=
710 content::StoragePartition::REMOVE_DATA_MASK_WEBRTC_IDENTITY; 699 content::StoragePartition::REMOVE_DATA_MASK_WEBRTC_IDENTITY;
711 } 700 }
712 701
713 if (storage_partition_remove_mask) { 702 if (storage_partition_remove_mask) {
714 waiting_for_clear_storage_partition_data_ = true; 703 waiting_for_clear_storage_partition_data_ = true;
715 704
(...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after
1219 waiting_for_clear_domain_reliability_monitor_ = false; 1208 waiting_for_clear_domain_reliability_monitor_ = false;
1220 NotifyAndDeleteIfDone(); 1209 NotifyAndDeleteIfDone();
1221 } 1210 }
1222 1211
1223 // static 1212 // static
1224 BrowsingDataRemover::CallbackSubscription 1213 BrowsingDataRemover::CallbackSubscription
1225 BrowsingDataRemover::RegisterOnBrowsingDataRemovedCallback( 1214 BrowsingDataRemover::RegisterOnBrowsingDataRemovedCallback(
1226 const BrowsingDataRemover::Callback& callback) { 1215 const BrowsingDataRemover::Callback& callback) {
1227 return GetOnBrowsingDataRemovedCallbacks()->Add(callback); 1216 return GetOnBrowsingDataRemovedCallbacks()->Add(callback);
1228 } 1217 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698