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

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

Issue 2561983002: NavigationController: Reload methods migration (Closed)
Patch Set: merge master Created 4 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/flash_permission_context.h" 5 #include "chrome/browser/plugins/flash_permission_context.h"
6 6
7 #include "chrome/browser/content_settings/host_content_settings_map_factory.h" 7 #include "chrome/browser/content_settings/host_content_settings_map_factory.h"
8 #include "chrome/browser/permissions/permission_request_id.h" 8 #include "chrome/browser/permissions/permission_request_id.h"
9 #include "chrome/browser/plugins/flash_temporary_permission_tracker.h" 9 #include "chrome/browser/plugins/flash_temporary_permission_tracker.h"
10 #include "chrome/browser/plugins/plugin_utils.h" 10 #include "chrome/browser/plugins/plugin_utils.h"
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 id.render_frame_id())); 64 id.render_frame_id()));
65 65
66 if (PluginsEnterpriseSettingEnabled( 66 if (PluginsEnterpriseSettingEnabled(
67 HostContentSettingsMapFactory::GetForProfile(profile()))) { 67 HostContentSettingsMapFactory::GetForProfile(profile()))) {
68 // Enable the grant temporarily. 68 // Enable the grant temporarily.
69 FlashTemporaryPermissionTracker::Get(profile())->FlashEnabledForWebContents( 69 FlashTemporaryPermissionTracker::Get(profile())->FlashEnabledForWebContents(
70 web_contents); 70 web_contents);
71 } 71 }
72 72
73 // Automatically refresh the page. 73 // Automatically refresh the page.
74 web_contents->GetController().Reload(true /* check_for_repost */); 74 web_contents->GetController().Reload(content::ReloadType::NORMAL, true);
75 } 75 }
76 76
77 void FlashPermissionContext::UpdateContentSetting( 77 void FlashPermissionContext::UpdateContentSetting(
78 const GURL& requesting_origin, 78 const GURL& requesting_origin,
79 const GURL& embedding_origin, 79 const GURL& embedding_origin,
80 ContentSetting content_setting) { 80 ContentSetting content_setting) {
81 DCHECK_EQ(requesting_origin, requesting_origin.GetOrigin()); 81 DCHECK_EQ(requesting_origin, requesting_origin.GetOrigin());
82 DCHECK_EQ(embedding_origin, embedding_origin.GetOrigin()); 82 DCHECK_EQ(embedding_origin, embedding_origin.GetOrigin());
83 DCHECK(content_setting == CONTENT_SETTING_ALLOW || 83 DCHECK(content_setting == CONTENT_SETTING_ALLOW ||
84 content_setting == CONTENT_SETTING_BLOCK); 84 content_setting == CONTENT_SETTING_BLOCK);
(...skipping 12 matching lines...) Expand all
97 else 97 else
98 pattern = ContentSettingsPattern::FromURLNoWildcard(embedding_origin); 98 pattern = ContentSettingsPattern::FromURLNoWildcard(embedding_origin);
99 host_content_settings_map->SetContentSettingCustomScope( 99 host_content_settings_map->SetContentSettingCustomScope(
100 pattern, ContentSettingsPattern::Wildcard(), content_settings_type(), 100 pattern, ContentSettingsPattern::Wildcard(), content_settings_type(),
101 std::string(), content_setting); 101 std::string(), content_setting);
102 } 102 }
103 103
104 bool FlashPermissionContext::IsRestrictedToSecureOrigins() const { 104 bool FlashPermissionContext::IsRestrictedToSecureOrigins() const {
105 return false; 105 return false;
106 } 106 }
OLDNEW
« no previous file with comments | « chrome/browser/memory/tab_manager_unittest.cc ('k') | chrome/browser/plugins/plugin_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698