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

Unified Diff: ios/web/navigation/crw_session_controller.mm

Issue 2476373004: [ios] Removed User Action reporting from CRWSessionController. (Closed)
Patch Set: Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698