| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/ui/auto_login_info_bar_delegate.h" | 5 #include "chrome/browser/ui/auto_login_info_bar_delegate.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
| 10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
| 11 #include "base/prefs/pref_service.h" |
| 11 #include "base/utf_string_conversions.h" | 12 #include "base/utf_string_conversions.h" |
| 12 #include "chrome/browser/api/infobars/confirm_infobar_delegate.h" | 13 #include "chrome/browser/api/infobars/confirm_infobar_delegate.h" |
| 13 #include "chrome/browser/api/infobars/infobar_service.h" | 14 #include "chrome/browser/api/infobars/infobar_service.h" |
| 14 #include "chrome/browser/browser_process.h" | 15 #include "chrome/browser/browser_process.h" |
| 15 #include "chrome/browser/google/google_util.h" | 16 #include "chrome/browser/google/google_util.h" |
| 16 #include "chrome/browser/prefs/pref_service.h" | |
| 17 #include "chrome/browser/profiles/profile.h" | 17 #include "chrome/browser/profiles/profile.h" |
| 18 #include "chrome/browser/signin/ubertoken_fetcher.h" | 18 #include "chrome/browser/signin/ubertoken_fetcher.h" |
| 19 #include "chrome/browser/ui/webui/sync_promo/sync_promo_ui.h" | 19 #include "chrome/browser/ui/webui/sync_promo/sync_promo_ui.h" |
| 20 #include "chrome/common/chrome_notification_types.h" | 20 #include "chrome/common/chrome_notification_types.h" |
| 21 #include "chrome/common/chrome_switches.h" | 21 #include "chrome/common/chrome_switches.h" |
| 22 #include "chrome/common/pref_names.h" | 22 #include "chrome/common/pref_names.h" |
| 23 #include "chrome/common/url_constants.h" | 23 #include "chrome/common/url_constants.h" |
| 24 #include "content/public/browser/navigation_controller.h" | 24 #include "content/public/browser/navigation_controller.h" |
| 25 #include "content/public/browser/notification_details.h" | 25 #include "content/public/browser/notification_details.h" |
| 26 #include "content/public/browser/notification_observer.h" | 26 #include "content/public/browser/notification_observer.h" |
| (...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 250 | 250 |
| 251 void AutoLoginInfoBarDelegate::Observe(int type, | 251 void AutoLoginInfoBarDelegate::Observe(int type, |
| 252 const NotificationSource& source, | 252 const NotificationSource& source, |
| 253 const NotificationDetails& details) { | 253 const NotificationDetails& details) { |
| 254 DCHECK_EQ(chrome::NOTIFICATION_GOOGLE_SIGNED_OUT, type); | 254 DCHECK_EQ(chrome::NOTIFICATION_GOOGLE_SIGNED_OUT, type); |
| 255 // owner() can be NULL when InfoBarService removes us. See | 255 // owner() can be NULL when InfoBarService removes us. See |
| 256 // |InfoBarDelegate::clear_owner|. | 256 // |InfoBarDelegate::clear_owner|. |
| 257 if (owner()) | 257 if (owner()) |
| 258 owner()->RemoveInfoBar(this); | 258 owner()->RemoveInfoBar(this); |
| 259 } | 259 } |
| OLD | NEW |