Commit 974e0b55 authored by Eugene But's avatar Eugene But Committed by Commit Bot

Removed -[CRWWebController handleLowMemory] call.

Disabling and enabling web usage has the same effect of evicting tabs.

Bug: 732525
Change-Id: I2ecafe2ddaf419aaeea81500f94d8b5893dee95e
Reviewed-on: https://chromium-review.googlesource.com/581848Reviewed-by: default avatarMike Baxley <baxley@chromium.org>
Commit-Queue: Eugene But <eugenebut@chromium.org>
Cr-Commit-Position: refs/heads/master@{#488755}
parent 446e5b89
specific_include_rules = {
# TODO(crbug.com/732525): Remove crw_web_controller.h exception.
"^tab_test_util.mm$": [
"+ios/web/web_state/ui/crw_web_controller.h",
],
}
......@@ -20,7 +20,6 @@
#import "ios/chrome/browser/ui/tabs/tab_strip_controller_private.h"
#import "ios/chrome/test/app/chrome_test_util.h"
#import "ios/testing/wait_util.h"
#import "ios/web/web_state/ui/crw_web_controller.h"
#if !defined(__has_feature) || !__has_feature(objc_arc)
#error "This file requires ARC support."
......@@ -149,11 +148,9 @@ void EvictOtherTabModelTabs() {
IsIncognitoMode()
? [GetMainController().browserViewInformation mainTabModel]
: [GetMainController().browserViewInformation otrTabModel];
NSUInteger count = otherTabModel.count;
for (NSUInteger i = 0; i < count; i++) {
Tab* tab = [otherTabModel tabAtIndex:i];
[tab.webController handleLowMemory];
}
// Disabling and enabling web usage will evict all web views.
otherTabModel.webUsageEnabled = NO;
otherTabModel.webUsageEnabled = YES;
}
void CloseAllIncognitoTabs() {
......
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