| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/browser_init.h" | 5 #include "chrome/browser/ui/browser_init.h" |
| 6 | 6 |
| 7 #include <algorithm> // For max(). | 7 #include <algorithm> // For max(). |
| 8 | 8 |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/environment.h" | 10 #include "base/environment.h" |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 &DefaultBrowserInfoBarDelegate::AllowExpiry), 8000); // 8 seconds. | 180 &DefaultBrowserInfoBarDelegate::AllowExpiry), 8000); // 8 seconds. |
| 181 } | 181 } |
| 182 | 182 |
| 183 DefaultBrowserInfoBarDelegate::~DefaultBrowserInfoBarDelegate() { | 183 DefaultBrowserInfoBarDelegate::~DefaultBrowserInfoBarDelegate() { |
| 184 if (!action_taken_) | 184 if (!action_taken_) |
| 185 UMA_HISTOGRAM_COUNTS("DefaultBrowserWarning.Ignored", 1); | 185 UMA_HISTOGRAM_COUNTS("DefaultBrowserWarning.Ignored", 1); |
| 186 } | 186 } |
| 187 | 187 |
| 188 bool DefaultBrowserInfoBarDelegate::ShouldExpire( | 188 bool DefaultBrowserInfoBarDelegate::ShouldExpire( |
| 189 const content::LoadCommittedDetails& details) const { | 189 const content::LoadCommittedDetails& details) const { |
| 190 return details.is_user_initiated_main_frame_load() && should_expire_; | 190 return details.is_navigation_to_different_page() && should_expire_; |
| 191 } | 191 } |
| 192 | 192 |
| 193 gfx::Image* DefaultBrowserInfoBarDelegate::GetIcon() const { | 193 gfx::Image* DefaultBrowserInfoBarDelegate::GetIcon() const { |
| 194 return &ResourceBundle::GetSharedInstance().GetNativeImageNamed( | 194 return &ResourceBundle::GetSharedInstance().GetNativeImageNamed( |
| 195 IDR_PRODUCT_ICON_32); | 195 IDR_PRODUCT_ICON_32); |
| 196 } | 196 } |
| 197 | 197 |
| 198 string16 DefaultBrowserInfoBarDelegate::GetMessageText() const { | 198 string16 DefaultBrowserInfoBarDelegate::GetMessageText() const { |
| 199 return l10n_util::GetStringUTF16(IDS_DEFAULT_BROWSER_INFOBAR_SHORT_TEXT); | 199 return l10n_util::GetStringUTF16(IDS_DEFAULT_BROWSER_INFOBAR_SHORT_TEXT); |
| 200 } | 200 } |
| (...skipping 1222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1423 return false; | 1423 return false; |
| 1424 automation->SetExpectedTabCount(expected_tabs); | 1424 automation->SetExpectedTabCount(expected_tabs); |
| 1425 | 1425 |
| 1426 AutomationProviderList* list = | 1426 AutomationProviderList* list = |
| 1427 g_browser_process->InitAutomationProviderList(); | 1427 g_browser_process->InitAutomationProviderList(); |
| 1428 DCHECK(list); | 1428 DCHECK(list); |
| 1429 list->AddProvider(automation); | 1429 list->AddProvider(automation); |
| 1430 | 1430 |
| 1431 return true; | 1431 return true; |
| 1432 } | 1432 } |
| OLD | NEW |