Commit 7ad61a71 authored by stkhapugin's avatar stkhapugin Committed by Commit bot

[ObjC ARC] Converts ios/chrome/browser/metrics:metrics_internal to ARC.

Automatically generated ARCMigrate commit
Notable issues:None
BUG=624363
TEST=None

Review-Url: https://codereview.chromium.org/2820383002
Cr-Commit-Position: refs/heads/master@{#469004}
parent d9b9090d
......@@ -83,6 +83,7 @@ source_set("unit_tests") {
}
source_set("metrics_internal") {
configs += [ "//build/config/compiler:enable_arc" ]
sources = [
"first_user_action_recorder.cc",
"first_user_action_recorder.h",
......
......@@ -13,6 +13,10 @@
#import "ios/chrome/browser/tabs/tab_model_list.h"
#include "url/gurl.h"
#if !defined(__has_feature) || !__has_feature(objc_arc)
#error "This file requires ARC support."
#endif
namespace new_tab_page_uma {
bool IsCurrentlyOnNTP(ios::ChromeBrowserState* browserState) {
......
......@@ -9,6 +9,10 @@
#include "base/metrics/histogram_macros.h"
#import "ios/chrome/browser/ui/ui_util.h"
#if !defined(__has_feature) || !__has_feature(objc_arc)
#error "This file requires ARC support."
#endif
namespace ios_internal {
// Converts a UIKit size class to a size class for reporting.
......@@ -89,7 +93,6 @@ void ReportHorizontalSizeClassUsed(UIUserInterfaceSizeClass sizeClass) {
- (void)dealloc {
[[NSNotificationCenter defaultCenter] removeObserver:self];
[super dealloc];
}
- (void)horizontalSizeClassDidChange:(UIUserInterfaceSizeClass)newSizeClass {
......
......@@ -191,7 +191,7 @@ class TabUsageRecorder {
// Keep track of the current tab, but only if it has been evicted.
// This is kept as a pointer value only - it should never be dereferenced.
void* evicted_tab_;
__unsafe_unretained Tab* evicted_tab_;
// State of |evicted_tab_| at the time it became the current tab.
TabStateWhenSelected evicted_tab_state_;
......@@ -199,11 +199,11 @@ class TabUsageRecorder {
// Keep track of the tab last selected when this tab model was switched
// away from to another mode (e.g. to incognito).
// Kept as a pointer value only - it should never be dereferenced.
void* mode_switch_tab_;
__unsafe_unretained Tab* mode_switch_tab_;
// Keep track of a tab that was created to be immediately selected. It should
// not contribute to the "StatusWhenSwitchedBackToForeground" metric.
void* tab_created_selected_;
__unsafe_unretained Tab* tab_created_selected_;
// Keep track of when the evicted tab starts to reload, so that the total
// time it takes to reload can be recorded.
......
......@@ -10,6 +10,10 @@
#import "ios/chrome/browser/tabs/tab.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."
#endif
const char kTabUsageHistogramPrefix[] = "Tab";
// The histogram recording the state of the tab the user switches to.
......
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