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

Unified Diff: components/rlz/rlz_tracker_ios.cc

Issue 1212163011: Componentize chrome/browser/rlz (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compilation with gn Created 5 years, 6 months 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
Index: components/rlz/rlz_tracker_ios.cc
diff --git a/chrome/browser/rlz/rlz_ios.mm b/components/rlz/rlz_tracker_ios.cc
similarity index 57%
rename from chrome/browser/rlz/rlz_ios.mm
rename to components/rlz/rlz_tracker_ios.cc
index 7af1f59b051e2d9002dcc623d6d9b5d1f3c71ff6..7496c36cb90f26fc82ea3b151119a9e8f99c8322 100644
--- a/chrome/browser/rlz/rlz_ios.mm
+++ b/components/rlz/rlz_tracker_ios.cc
@@ -2,13 +2,18 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/rlz/rlz.h"
+#include "components/rlz/rlz_tracker.h"
-#import <UIKit/UIKit.h>
+#include "rlz/lib/rlz_lib.h"
+#include "ui/base/device_form_factor.h"
+
+#if defined(ENABLE_RLZ)
// static
rlz_lib::AccessPoint RLZTracker::ChromeOmnibox() {
- return UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone
+ return ui::GetDeviceFormFactor() == ui::DEVICE_FORM_FACTOR_PHONE
? rlz_lib::CHROME_IOS_OMNIBOX_MOBILE
: rlz_lib::CHROME_IOS_OMNIBOX_TABLET;
}
+
+#endif // defined(ENABLE_RLZ)

Powered by Google App Engine
This is Rietveld 408576698