| 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/content_settings/content_setting_bubble_model.h" | 5 #include "chrome/browser/ui/content_settings/content_setting_bubble_model.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 493 content_settings::RecordPluginsAction( | 493 content_settings::RecordPluginsAction( |
| 494 content_settings::PLUGINS_ACTION_DISPLAYED_BUBBLE); | 494 content_settings::PLUGINS_ACTION_DISPLAYED_BUBBLE); |
| 495 } | 495 } |
| 496 | 496 |
| 497 ContentSettingPluginBubbleModel::~ContentSettingPluginBubbleModel() { | 497 ContentSettingPluginBubbleModel::~ContentSettingPluginBubbleModel() { |
| 498 // If the user elected to allow all plugins then run plugins at this time. | 498 // If the user elected to allow all plugins then run plugins at this time. |
| 499 if (settings_changed() && selected_item() == kAllowButtonIndex) { | 499 if (settings_changed() && selected_item() == kAllowButtonIndex) { |
| 500 content_settings::RecordPluginsAction( | 500 content_settings::RecordPluginsAction( |
| 501 content_settings:: | 501 content_settings:: |
| 502 PLUGINS_ACTION_CLICKED_ALWAYS_ALLOW_PLUGINS_ON_ORIGIN); | 502 PLUGINS_ACTION_CLICKED_ALWAYS_ALLOW_PLUGINS_ON_ORIGIN); |
| 503 rappor::SampleDomainAndRegistryFromGURL( |
| 504 rappor_service(), "ContentSettings.Plugins.AddedAllowException", |
| 505 web_contents()->GetLastCommittedURL()); |
| 506 |
| 503 RunPluginsOnPage(); | 507 RunPluginsOnPage(); |
| 504 } | 508 } |
| 505 } | 509 } |
| 506 | 510 |
| 507 void ContentSettingPluginBubbleModel::OnLearnMoreLinkClicked() { | 511 void ContentSettingPluginBubbleModel::OnLearnMoreLinkClicked() { |
| 508 if (delegate()) | 512 if (delegate()) |
| 509 delegate()->ShowLearnMorePage(CONTENT_SETTINGS_TYPE_PLUGINS); | 513 delegate()->ShowLearnMorePage(CONTENT_SETTINGS_TYPE_PLUGINS); |
| 510 | 514 |
| 511 content_settings::RecordPluginsAction( | 515 content_settings::RecordPluginsAction( |
| 512 content_settings::PLUGINS_ACTION_CLICKED_LEARN_MORE); | 516 content_settings::PLUGINS_ACTION_CLICKED_LEARN_MORE); |
| (...skipping 917 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1430 ContentSettingMediaStreamBubbleModel* | 1434 ContentSettingMediaStreamBubbleModel* |
| 1431 ContentSettingBubbleModel::AsMediaStreamBubbleModel() { | 1435 ContentSettingBubbleModel::AsMediaStreamBubbleModel() { |
| 1432 // In general, bubble models might not inherit from the media bubble model. | 1436 // In general, bubble models might not inherit from the media bubble model. |
| 1433 return nullptr; | 1437 return nullptr; |
| 1434 } | 1438 } |
| 1435 | 1439 |
| 1436 ContentSettingSubresourceFilterBubbleModel* | 1440 ContentSettingSubresourceFilterBubbleModel* |
| 1437 ContentSettingBubbleModel::AsSubresourceFilterBubbleModel() { | 1441 ContentSettingBubbleModel::AsSubresourceFilterBubbleModel() { |
| 1438 return nullptr; | 1442 return nullptr; |
| 1439 } | 1443 } |
| OLD | NEW |