Commit ace092d0 authored by Peter K. Lee's avatar Peter K. Lee Committed by Commit Bot

Removed code that clears Google App Launcher data.

Now that Google App Launcher has been deprecated, there's nothing left
to be cleared.

Bug: 721921,227636
Change-Id: I32cf9f3ea7b458f80ef91e24984db379d9abe4cb
Reviewed-on: https://chromium-review.googlesource.com/544848
Commit-Queue: Peter Lee <pkl@chromium.org>
Commit-Queue: Louis Romero <lpromero@chromium.org>
Reviewed-by: default avatarLouis Romero <lpromero@chromium.org>
Cr-Commit-Position: refs/heads/master@{#481855}
parent 059780c6
...@@ -97,8 +97,6 @@ source_set("browsing_data_internal") { ...@@ -97,8 +97,6 @@ source_set("browsing_data_internal") {
"//ios/chrome/browser/signin", "//ios/chrome/browser/signin",
"//ios/chrome/browser/snapshots", "//ios/chrome/browser/snapshots",
"//ios/chrome/browser/ui:ui_internal", "//ios/chrome/browser/ui:ui_internal",
"//ios/public/provider/chrome/browser",
"//ios/public/provider/chrome/browser/native_app_launcher",
"//ios/web", "//ios/web",
"//net", "//net",
] ]
......
...@@ -24,9 +24,6 @@ ...@@ -24,9 +24,6 @@
#include "ios/chrome/browser/signin/account_consistency_service_factory.h" #include "ios/chrome/browser/signin/account_consistency_service_factory.h"
#import "ios/chrome/browser/snapshots/snapshots_util.h" #import "ios/chrome/browser/snapshots/snapshots_util.h"
#import "ios/chrome/browser/ui/browser_view_controller.h" #import "ios/chrome/browser/ui/browser_view_controller.h"
#include "ios/public/provider/chrome/browser/chrome_browser_provider.h"
#import "ios/public/provider/chrome/browser/native_app_launcher/native_app_metadata.h"
#import "ios/public/provider/chrome/browser/native_app_launcher/native_app_whitelist_manager.h"
#include "ios/web/public/web_thread.h" #include "ios/web/public/web_thread.h"
#import "ios/web/public/web_view_creation_util.h" #import "ios/web/public/web_view_creation_util.h"
#import "ios/web/web_state/ui/wk_web_view_configuration_provider.h" #import "ios/web/web_state/ui/wk_web_view_configuration_provider.h"
...@@ -46,8 +43,6 @@ void DoNothing(int n) {} ...@@ -46,8 +43,6 @@ void DoNothing(int n) {}
} }
@interface BrowsingDataRemovalController () @interface BrowsingDataRemovalController ()
// Removes data used by the Google App Launcher.
- (void)removeGALData;
// Removes browsing data that is created by web views associated with // Removes browsing data that is created by web views associated with
// |browserState|. |mask| is obtained from // |browserState|. |mask| is obtained from
// IOSChromeBrowsingDataRemover::RemoveDataMask. |deleteBegin| defines the begin // IOSChromeBrowsingDataRemover::RemoveDataMask. |deleteBegin| defines the begin
...@@ -236,13 +231,6 @@ void DoNothing(int n) {} ...@@ -236,13 +231,6 @@ void DoNothing(int n) {}
ClearIOSSnapshots(); ClearIOSSnapshots();
} }
// TODO(crbug.com/227636): Support multiple profile.
// Google App Launcher data is tied to the normal profile.
if (mask & IOSChromeBrowsingDataRemover::REMOVE_GOOGLE_APP_LAUNCHER_DATA &&
!browserState->IsOffTheRecord()) {
[self removeGALData];
}
if (browserState->IsOffTheRecord()) { if (browserState->IsOffTheRecord()) {
// In incognito, only data removal for all time is currently supported. // In incognito, only data removal for all time is currently supported.
DCHECK_EQ(base::Time(), deleteBegin); DCHECK_EQ(base::Time(), deleteBegin);
...@@ -256,15 +244,6 @@ void DoNothing(int n) {} ...@@ -256,15 +244,6 @@ void DoNothing(int n) {}
completionHandler:browsingDataCleared]; completionHandler:browsingDataCleared];
} }
- (void)removeGALData {
[ios::GetChromeBrowserProvider()->GetNativeAppWhitelistManager()
filteredAppsUsingBlock:^BOOL(const id<NativeAppMetadata> app,
BOOL* stop) {
[app resetInfobarHistory];
return NO;
}];
}
- (void)removeWebViewCreatedBrowsingDataFromBrowserState: - (void)removeWebViewCreatedBrowsingDataFromBrowserState:
(ios::ChromeBrowserState*)browserState (ios::ChromeBrowserState*)browserState
mask:(int)mask mask:(int)mask
......
...@@ -48,9 +48,8 @@ class IOSChromeBrowsingDataRemover { ...@@ -48,9 +48,8 @@ class IOSChromeBrowsingDataRemover {
REMOVE_PASSWORDS = 1 << 8, REMOVE_PASSWORDS = 1 << 8,
REMOVE_WEBSQL = 1 << 9, REMOVE_WEBSQL = 1 << 9,
REMOVE_CHANNEL_IDS = 1 << 10, REMOVE_CHANNEL_IDS = 1 << 10,
REMOVE_GOOGLE_APP_LAUNCHER_DATA = 1 << 11, REMOVE_CACHE_STORAGE = 1 << 11,
REMOVE_CACHE_STORAGE = 1 << 12, REMOVE_VISITED_LINKS = 1 << 12,
REMOVE_VISITED_LINKS = 1 << 13,
// "Site data" includes cookies, appcache, file systems, indexedDBs, local // "Site data" includes cookies, appcache, file systems, indexedDBs, local
// storage, webSQL, service workers, cache storage, plugin data, and web app // storage, webSQL, service workers, cache storage, plugin data, and web app
......
...@@ -273,13 +273,10 @@ const int kMaxTimesHistoryNoticeShown = 1; ...@@ -273,13 +273,10 @@ const int kMaxTimesHistoryNoticeShown = 1;
// Data types section. // Data types section.
[model addSectionWithIdentifier:SectionIdentifierDataTypes]; [model addSectionWithIdentifier:SectionIdentifierDataTypes];
int clearBrowsingHistoryMask =
IOSChromeBrowsingDataRemover::REMOVE_HISTORY |
IOSChromeBrowsingDataRemover::REMOVE_GOOGLE_APP_LAUNCHER_DATA;
CollectionViewItem* browsingHistoryItem = CollectionViewItem* browsingHistoryItem =
[self clearDataItemWithType:ItemTypeDataTypeBrowsingHistory [self clearDataItemWithType:ItemTypeDataTypeBrowsingHistory
titleID:IDS_IOS_CLEAR_BROWSING_HISTORY titleID:IDS_IOS_CLEAR_BROWSING_HISTORY
mask:clearBrowsingHistoryMask mask:IOSChromeBrowsingDataRemover::REMOVE_HISTORY
prefName:browsing_data::prefs::kDeleteBrowsingHistory]; prefName:browsing_data::prefs::kDeleteBrowsingHistory];
[model addItem:browsingHistoryItem [model addItem:browsingHistoryItem
toSectionWithIdentifier:SectionIdentifierDataTypes]; toSectionWithIdentifier:SectionIdentifierDataTypes];
...@@ -726,9 +723,7 @@ const int kMaxTimesHistoryNoticeShown = 1; ...@@ -726,9 +723,7 @@ const int kMaxTimesHistoryNoticeShown = 1;
if (!model) if (!model)
return; return;
if (data_mask & if (data_mask & IOSChromeBrowsingDataRemover::REMOVE_HISTORY) {
(IOSChromeBrowsingDataRemover::REMOVE_HISTORY |
IOSChromeBrowsingDataRemover::REMOVE_GOOGLE_APP_LAUNCHER_DATA)) {
NSIndexPath* indexPath = [self.collectionViewModel NSIndexPath* indexPath = [self.collectionViewModel
indexPathForItemType:ItemTypeDataTypeBrowsingHistory indexPathForItemType:ItemTypeDataTypeBrowsingHistory
sectionIdentifier:SectionIdentifierDataTypes]; sectionIdentifier:SectionIdentifierDataTypes];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment