| Index: ios/web/navigation/crw_session_controller.mm
|
| diff --git a/ios/web/navigation/crw_session_controller.mm b/ios/web/navigation/crw_session_controller.mm
|
| index a325c46185c4e062ddfa84dec0422a57b8723efd..2d27612497fc21b8ce22590559fba299edb5424e 100644
|
| --- a/ios/web/navigation/crw_session_controller.mm
|
| +++ b/ios/web/navigation/crw_session_controller.mm
|
| @@ -14,8 +14,6 @@
|
| #include "base/logging.h"
|
| #import "base/mac/foundation_util.h"
|
| #import "base/mac/scoped_nsobject.h"
|
| -#include "base/metrics/user_metrics.h"
|
| -#include "base/metrics/user_metrics_action.h"
|
| #include "base/strings/sys_string_conversions.h"
|
| #import "ios/web/history_state_util.h"
|
| #import "ios/web/navigation/crw_session_certificate_policy_manager.h"
|
| @@ -34,8 +32,6 @@
|
| #error "This file requires ARC support."
|
| #endif
|
|
|
| -using base::UserMetricsAction;
|
| -
|
| namespace {
|
| NSString* const kCertificatePolicyManagerKey = @"certificatePolicyManager";
|
| NSString* const kCurrentNavigationIndexKey = @"currentNavigationIndex";
|
| @@ -634,19 +630,14 @@ NSString* const kWindowNameKey = @"windowName";
|
| return;
|
|
|
| NSInteger newNavigationIndex = [_entries indexOfObject:entry];
|
| - NSInteger delta = newNavigationIndex - _currentNavigationIndex;
|
| - if (delta < 0) {
|
| - for (int i = delta; i < 0; i++) {
|
| - base::RecordAction(UserMetricsAction("Back"));
|
| - }
|
| + if (newNavigationIndex < _currentNavigationIndex) {
|
| + // Going back.
|
| [self discardNonCommittedEntries];
|
| - } else if (0 < delta) {
|
| - for (int i = 0; i < delta; i++) {
|
| - base::RecordAction(UserMetricsAction("Forward"));
|
| - }
|
| + } else if (_currentNavigationIndex < newNavigationIndex) {
|
| + // Going forward.
|
| [self discardTransientEntry];
|
| } else {
|
| - // delta is 0, no need to change current navigation index.
|
| + // |delta| is 0, no need to change current navigation index.
|
| return;
|
| }
|
|
|
|
|