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/plugin_infobar_delegates.h" | 5 #include "chrome/browser/plugin_infobar_delegates.h" |
6 | 6 |
7 #include "base/utf_string_conversions.h" | 7 #include "base/utf_string_conversions.h" |
8 #include "chrome/browser/api/infobars/infobar_tab_service.h" | 8 #include "chrome/browser/api/infobars/infobar_tab_service.h" |
9 #include "chrome/browser/content_settings/host_content_settings_map.h" | 9 #include "chrome/browser/content_settings/host_content_settings_map.h" |
10 #include "chrome/browser/google/google_util.h" | 10 #include "chrome/browser/google/google_util.h" |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
168 break; | 168 break; |
169 } | 169 } |
170 return new OutdatedPluginInfoBarDelegate( | 170 return new OutdatedPluginInfoBarDelegate( |
171 observer, installer, message); | 171 observer, installer, message); |
172 } | 172 } |
173 | 173 |
174 OutdatedPluginInfoBarDelegate::OutdatedPluginInfoBarDelegate( | 174 OutdatedPluginInfoBarDelegate::OutdatedPluginInfoBarDelegate( |
175 PluginObserver* observer, | 175 PluginObserver* observer, |
176 PluginInstaller* installer, | 176 PluginInstaller* installer, |
177 const string16& message) | 177 const string16& message) |
178 : PluginInfoBarDelegate( | 178 : PluginInfoBarDelegate(InfoBarTabService::ForTab(observer->tab_contents()), |
Jói
2012/08/21 16:30:46
This was just a formatting fix I stumbled on as I
| |
179 | 179 installer->name(), |
180 InfoBarTabService::ForTab(observer->tab_contents()), | 180 installer->identifier()), |
181 installer->name(), | |
182 installer->identifier()), | |
183 WeakPluginInstallerObserver(installer), | 181 WeakPluginInstallerObserver(installer), |
184 observer_(observer), | 182 observer_(observer), |
185 message_(message) { | 183 message_(message) { |
186 content::RecordAction(UserMetricsAction("OutdatedPluginInfobar.Shown")); | 184 content::RecordAction(UserMetricsAction("OutdatedPluginInfobar.Shown")); |
187 std::string name = UTF16ToUTF8(installer->name()); | 185 std::string name = UTF16ToUTF8(installer->name()); |
188 if (name == webkit::npapi::PluginGroup::kJavaGroupName) | 186 if (name == webkit::npapi::PluginGroup::kJavaGroupName) |
189 content::RecordAction( | 187 content::RecordAction( |
190 UserMetricsAction("OutdatedPluginInfobar.Shown.Java")); | 188 UserMetricsAction("OutdatedPluginInfobar.Shown.Java")); |
191 else if (name == webkit::npapi::PluginGroup::kQuickTimeGroupName) | 189 else if (name == webkit::npapi::PluginGroup::kQuickTimeGroupName) |
192 content::RecordAction( | 190 content::RecordAction( |
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
487 "https://support.google.com/chrome/?ib_display_in_desktop")); | 485 "https://support.google.com/chrome/?ib_display_in_desktop")); |
488 OpenURLParams params( | 486 OpenURLParams params( |
489 url, Referrer(), | 487 url, Referrer(), |
490 (disposition == CURRENT_TAB) ? NEW_FOREGROUND_TAB : disposition, | 488 (disposition == CURRENT_TAB) ? NEW_FOREGROUND_TAB : disposition, |
491 content::PAGE_TRANSITION_LINK, false); | 489 content::PAGE_TRANSITION_LINK, false); |
492 owner()->GetWebContents()->OpenURL(params); | 490 owner()->GetWebContents()->OpenURL(params); |
493 return false; | 491 return false; |
494 } | 492 } |
495 #endif // defined(OS_WIN) | 493 #endif // defined(OS_WIN) |
496 #endif // defined(ENABLE_PLUGIN_INSTALLATION) | 494 #endif // defined(ENABLE_PLUGIN_INSTALLATION) |
OLD | NEW |