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

Unified Diff: chrome/browser/ui/autofill/chrome_autofill_client.cc

Issue 666283002: Android: Remove unused ZoomController, which also references extensions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix tests Created 6 years, 2 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
« no previous file with comments | « chrome/browser/renderer_preferences_util.cc ('k') | chrome/chrome_browser_ui.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/autofill/chrome_autofill_client.cc
diff --git a/chrome/browser/ui/autofill/chrome_autofill_client.cc b/chrome/browser/ui/autofill/chrome_autofill_client.cc
index d34482d41d498f16274bf8b686dfa486c6480dfe..41f2aaac04d8301b7b0c872a2656b25f2ec994c2 100644
--- a/chrome/browser/ui/autofill/chrome_autofill_client.cc
+++ b/chrome/browser/ui/autofill/chrome_autofill_client.cc
@@ -18,7 +18,6 @@
#include "chrome/browser/ui/browser_window.h"
#include "chrome/browser/ui/chrome_pages.h"
#include "chrome/browser/ui/tabs/tab_strip_model_observer.h"
-#include "chrome/browser/ui/zoom/zoom_controller.h"
#include "chrome/browser/webdata/web_data_service_factory.h"
#include "chrome/common/url_constants.h"
#include "components/autofill/content/browser/content_autofill_driver.h"
@@ -30,6 +29,8 @@
#if defined(OS_ANDROID)
#include "chrome/browser/android/chromium_application.h"
#include "chrome/browser/ui/android/autofill/autofill_logger_android.h"
+#else
+#include "chrome/browser/ui/zoom/zoom_controller.h"
#endif
DEFINE_WEB_CONTENTS_USER_DATA_KEY(autofill::ChromeAutofillClient);
@@ -39,6 +40,8 @@ namespace autofill {
ChromeAutofillClient::ChromeAutofillClient(content::WebContents* web_contents)
: content::WebContentsObserver(web_contents), web_contents_(web_contents) {
DCHECK(web_contents);
+
+#if !defined(OS_ANDROID)
// Since ZoomController is also a WebContentsObserver, we need to be careful
// about disconnecting from it since the relative order of destruction of
// WebContentsObservers is not guaranteed. ZoomController silently clears
@@ -46,9 +49,11 @@ ChromeAutofillClient::ChromeAutofillClient(content::WebContents* web_contents)
// to explicitly remove ourselves on destruction.
ZoomController* zoom_controller =
ZoomController::FromWebContents(web_contents);
- // There may not always be a ZoomController, e.g. on Android.
+ // There may not always be a ZoomController, e.g. in tests.
if (zoom_controller)
zoom_controller->AddObserver(this);
+#endif
+
#if defined(OS_MACOSX) && !defined(OS_IOS)
RegisterForKeystoneNotifications();
#endif // defined(OS_MACOSX) && !defined(OS_IOS)
« no previous file with comments | « chrome/browser/renderer_preferences_util.cc ('k') | chrome/chrome_browser_ui.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698