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/plugins/plugin_observer.h" | 5 #include "chrome/browser/plugins/plugin_observer.h" |
6 | 6 |
7 #include "base/auto_reset.h" | 7 #include "base/auto_reset.h" |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/debug/crash_logging.h" | 9 #include "base/debug/crash_logging.h" |
10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
(...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
434 return; | 434 return; |
435 } | 435 } |
436 delete it->second; | 436 delete it->second; |
437 plugin_placeholders_.erase(it); | 437 plugin_placeholders_.erase(it); |
438 } | 438 } |
439 #endif // defined(ENABLE_PLUGIN_INSTALLATION) | 439 #endif // defined(ENABLE_PLUGIN_INSTALLATION) |
440 | 440 |
441 void PluginObserver::OnOpenAboutPlugins() { | 441 void PluginObserver::OnOpenAboutPlugins() { |
442 web_contents()->OpenURL(OpenURLParams( | 442 web_contents()->OpenURL(OpenURLParams( |
443 GURL(chrome::kChromeUIPluginsURL), | 443 GURL(chrome::kChromeUIPluginsURL), |
444 content::Referrer(web_contents()->GetURL(), | 444 content::Referrer::SanitizeForRequest( |
445 blink::WebReferrerPolicyDefault), | 445 GURL(chrome::kChromeUIPluginsURL), |
| 446 content::Referrer(web_contents()->GetURL(), |
| 447 blink::WebReferrerPolicyDefault)), |
446 NEW_FOREGROUND_TAB, ui::PAGE_TRANSITION_AUTO_BOOKMARK, false)); | 448 NEW_FOREGROUND_TAB, ui::PAGE_TRANSITION_AUTO_BOOKMARK, false)); |
447 } | 449 } |
448 | 450 |
449 void PluginObserver::OnCouldNotLoadPlugin(const base::FilePath& plugin_path) { | 451 void PluginObserver::OnCouldNotLoadPlugin(const base::FilePath& plugin_path) { |
450 g_browser_process->GetMetricsServicesManager()->OnPluginLoadingError( | 452 g_browser_process->GetMetricsServicesManager()->OnPluginLoadingError( |
451 plugin_path); | 453 plugin_path); |
452 base::string16 plugin_name = | 454 base::string16 plugin_name = |
453 PluginService::GetInstance()->GetPluginDisplayNameByPath(plugin_path); | 455 PluginService::GetInstance()->GetPluginDisplayNameByPath(plugin_path); |
454 SimpleAlertInfoBarDelegate::Create( | 456 SimpleAlertInfoBarDelegate::Create( |
455 InfoBarService::FromWebContents(web_contents()), | 457 InfoBarService::FromWebContents(web_contents()), |
(...skipping 25 matching lines...) Expand all Loading... |
481 scoped_ptr<PluginMetadata> plugin; | 483 scoped_ptr<PluginMetadata> plugin; |
482 bool ret = PluginFinder::GetInstance()->FindPluginWithIdentifier( | 484 bool ret = PluginFinder::GetInstance()->FindPluginWithIdentifier( |
483 identifier, NULL, &plugin); | 485 identifier, NULL, &plugin); |
484 DCHECK(ret); | 486 DCHECK(ret); |
485 | 487 |
486 PluginMetroModeInfoBarDelegate::Create( | 488 PluginMetroModeInfoBarDelegate::Create( |
487 InfoBarService::FromWebContents(web_contents()), | 489 InfoBarService::FromWebContents(web_contents()), |
488 PluginMetroModeInfoBarDelegate::DESKTOP_MODE_REQUIRED, plugin->name()); | 490 PluginMetroModeInfoBarDelegate::DESKTOP_MODE_REQUIRED, plugin->name()); |
489 #endif | 491 #endif |
490 } | 492 } |
OLD | NEW |