| 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 <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/auto_reset.h" | 9 #include "base/auto_reset.h" |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 410 NOTREACHED(); | 410 NOTREACHED(); |
| 411 #endif // defined(ENABLE_PLUGIN_INSTALLATION) | 411 #endif // defined(ENABLE_PLUGIN_INSTALLATION) |
| 412 } | 412 } |
| 413 | 413 |
| 414 void PluginObserver::OnBlockedComponentUpdatedPlugin( | 414 void PluginObserver::OnBlockedComponentUpdatedPlugin( |
| 415 int placeholder_id, | 415 int placeholder_id, |
| 416 const std::string& identifier) { | 416 const std::string& identifier) { |
| 417 component_observers_[placeholder_id] = | 417 component_observers_[placeholder_id] = |
| 418 base::MakeUnique<ComponentObserver>(this, placeholder_id, identifier); | 418 base::MakeUnique<ComponentObserver>(this, placeholder_id, identifier); |
| 419 g_browser_process->component_updater()->GetOnDemandUpdater().OnDemandUpdate( | 419 g_browser_process->component_updater()->GetOnDemandUpdater().OnDemandUpdate( |
| 420 identifier); | 420 identifier, |
| 421 component_updater::ComponentUpdateService::CompletionCallback()); |
| 421 } | 422 } |
| 422 | 423 |
| 423 void PluginObserver::RemoveComponentObserver(int placeholder_id) { | 424 void PluginObserver::RemoveComponentObserver(int placeholder_id) { |
| 424 auto it = component_observers_.find(placeholder_id); | 425 auto it = component_observers_.find(placeholder_id); |
| 425 DCHECK(it != component_observers_.end()); | 426 DCHECK(it != component_observers_.end()); |
| 426 component_observers_.erase(it); | 427 component_observers_.erase(it); |
| 427 } | 428 } |
| 428 | 429 |
| 429 #if defined(ENABLE_PLUGIN_INSTALLATION) | 430 #if defined(ENABLE_PLUGIN_INSTALLATION) |
| 430 void PluginObserver::OnRemovePluginPlaceholderHost(int placeholder_id) { | 431 void PluginObserver::OnRemovePluginPlaceholderHost(int placeholder_id) { |
| (...skipping 29 matching lines...) Expand all Loading... |
| 460 IDR_INFOBAR_PLUGIN_CRASHED, | 461 IDR_INFOBAR_PLUGIN_CRASHED, |
| 461 #if !defined(OS_MACOSX) && !defined(OS_ANDROID) | 462 #if !defined(OS_MACOSX) && !defined(OS_ANDROID) |
| 462 gfx::VectorIconId::EXTENSION_CRASHED, | 463 gfx::VectorIconId::EXTENSION_CRASHED, |
| 463 #else | 464 #else |
| 464 gfx::VectorIconId::VECTOR_ICON_NONE, | 465 gfx::VectorIconId::VECTOR_ICON_NONE, |
| 465 #endif | 466 #endif |
| 466 l10n_util::GetStringFUTF16(IDS_PLUGIN_INITIALIZATION_ERROR_PROMPT, | 467 l10n_util::GetStringFUTF16(IDS_PLUGIN_INITIALIZATION_ERROR_PROMPT, |
| 467 plugin_name), | 468 plugin_name), |
| 468 true); | 469 true); |
| 469 } | 470 } |
| OLD | NEW |