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

Unified Diff: chrome/browser/ui/autofill/chrome_autofill_client_mac.mm

Issue 334653006: mac: Prevent Address Book permissions dialog from erroneously appearing. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: First. Created 6 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: chrome/browser/ui/autofill/chrome_autofill_client_mac.mm
diff --git a/chrome/browser/ui/autofill/chrome_autofill_client_mac.mm b/chrome/browser/ui/autofill/chrome_autofill_client_mac.mm
new file mode 100644
index 0000000000000000000000000000000000000000..7a40772cf38d1aca7d37fec9f0aa818e4ada07ed
--- /dev/null
+++ b/chrome/browser/ui/autofill/chrome_autofill_client_mac.mm
@@ -0,0 +1,38 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/ui/autofill/chrome_autofill_client.h"
+
+#import "chrome/browser/autofill/autofill_keystone_observer_mac.h"
+#include "components/autofill/core/browser/personal_data_manager.h"
+
+namespace autofill {
+
+void ChromeAutofillClient::AddKeystoneObserver() {
+ DCHECK(!keystone_observer_);
+ keystone_observer_ = new AutofillKeystoneObserverMac(this);
+}
+
+void ChromeAutofillClient::RemoveKeystoneObserver() {
+ DCHECK(keystone_observer_);
+ delete keystone_observer_;
+ keystone_observer_ = NULL;
+}
+
+void ChromeAutofillClient::OnKeystoneNotification(
+ keystone_glue::AutoupdateStatus status) {
+ switch (status) {
+ case keystone_glue::kAutoupdateInstalling:
+ case keystone_glue::kAutoupdateInstalled: {
+ PersonalDataManager* manager = GetPersonalDataManager();
+ if (manager)
Ilya Sherman 2014/06/14 01:18:51 Why might the manager be null?
erikchen 2014/06/16 20:30:46 There is no comment indicating that the method is
+ manager->BinaryChanging();
+ return;
+ }
+ default:
+ return;
+ }
+}
+
+} // namespace autofill

Powered by Google App Engine
This is Rietveld 408576698