Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(321)

Side by Side Diff: chrome/browser/plugins/plugin_infobar_delegates.cc

Issue 106713004: Remove kEnableResourceContentSettings and all the code that uses it since it's been behind a flag f… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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_infobar_delegates.h" 5 #include "chrome/browser/plugins/plugin_infobar_delegates.h"
6 6
7 #include "base/path_service.h" 7 #include "base/path_service.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.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 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 content::RecordAction( 144 content::RecordAction(
145 UserMetricsAction("BlockedPluginInfobar.AllowThisTime")); 145 UserMetricsAction("BlockedPluginInfobar.AllowThisTime"));
146 LoadBlockedPlugins(); 146 LoadBlockedPlugins();
147 return true; 147 return true;
148 } 148 }
149 149
150 bool UnauthorizedPluginInfoBarDelegate::Cancel() { 150 bool UnauthorizedPluginInfoBarDelegate::Cancel() {
151 content::RecordAction(UserMetricsAction("BlockedPluginInfobar.AlwaysAllow")); 151 content::RecordAction(UserMetricsAction("BlockedPluginInfobar.AlwaysAllow"));
152 const GURL& url = web_contents()->GetURL(); 152 const GURL& url = web_contents()->GetURL();
153 content_settings_->AddExceptionForURL(url, url, CONTENT_SETTINGS_TYPE_PLUGINS, 153 content_settings_->AddExceptionForURL(url, url, CONTENT_SETTINGS_TYPE_PLUGINS,
154 std::string(), CONTENT_SETTING_ALLOW); 154 CONTENT_SETTING_ALLOW);
155 LoadBlockedPlugins(); 155 LoadBlockedPlugins();
156 return true; 156 return true;
157 } 157 }
158 158
159 void UnauthorizedPluginInfoBarDelegate::InfoBarDismissed() { 159 void UnauthorizedPluginInfoBarDelegate::InfoBarDismissed() {
160 content::RecordAction(UserMetricsAction("BlockedPluginInfobar.Dismissed")); 160 content::RecordAction(UserMetricsAction("BlockedPluginInfobar.Dismissed"));
161 } 161 }
162 162
163 bool UnauthorizedPluginInfoBarDelegate::LinkClicked( 163 bool UnauthorizedPluginInfoBarDelegate::LinkClicked(
164 WindowOpenDisposition disposition) { 164 WindowOpenDisposition disposition) {
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after
525 "https://support.google.com/chrome/?p=ib_redirect_to_desktop"), 525 "https://support.google.com/chrome/?p=ib_redirect_to_desktop"),
526 content::Referrer(), 526 content::Referrer(),
527 (disposition == CURRENT_TAB) ? NEW_FOREGROUND_TAB : disposition, 527 (disposition == CURRENT_TAB) ? NEW_FOREGROUND_TAB : disposition,
528 content::PAGE_TRANSITION_LINK, false)); 528 content::PAGE_TRANSITION_LINK, false));
529 return false; 529 return false;
530 } 530 }
531 531
532 #endif // defined(OS_WIN) 532 #endif // defined(OS_WIN)
533 533
534 #endif // defined(ENABLE_PLUGIN_INSTALLATION) 534 #endif // defined(ENABLE_PLUGIN_INSTALLATION)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698