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

Side by Side Diff: chrome/browser/permissions/permission_context_base.cc

Issue 2391743005: Make the flash permission prompt work properly on file: URLs (Closed)
Patch Set: test prompt Created 4 years, 2 months 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
« no previous file with comments | « no previous file | chrome/browser/permissions/permissions_browsertest.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/permissions/permission_context_base.h" 5 #include "chrome/browser/permissions/permission_context_base.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 } 285 }
286 286
287 void PermissionContextBase::UpdateContentSetting( 287 void PermissionContextBase::UpdateContentSetting(
288 const GURL& requesting_origin, 288 const GURL& requesting_origin,
289 const GURL& embedding_origin, 289 const GURL& embedding_origin,
290 ContentSetting content_setting) { 290 ContentSetting content_setting) {
291 DCHECK_EQ(requesting_origin, requesting_origin.GetOrigin()); 291 DCHECK_EQ(requesting_origin, requesting_origin.GetOrigin());
292 DCHECK_EQ(embedding_origin, embedding_origin.GetOrigin()); 292 DCHECK_EQ(embedding_origin, embedding_origin.GetOrigin());
293 DCHECK(content_setting == CONTENT_SETTING_ALLOW || 293 DCHECK(content_setting == CONTENT_SETTING_ALLOW ||
294 content_setting == CONTENT_SETTING_BLOCK); 294 content_setting == CONTENT_SETTING_BLOCK);
295 DCHECK(!requesting_origin.SchemeIsFile());
296 DCHECK(!embedding_origin.SchemeIsFile());
295 297
296 HostContentSettingsMapFactory::GetForProfile(profile_) 298 HostContentSettingsMapFactory::GetForProfile(profile_)
297 ->SetContentSettingDefaultScope(requesting_origin, embedding_origin, 299 ->SetContentSettingDefaultScope(requesting_origin, embedding_origin,
298 content_settings_type_, std::string(), 300 content_settings_type_, std::string(),
299 content_setting); 301 content_setting);
300 } 302 }
301 303
302 bool PermissionContextBase::IsPermissionKillSwitchOn() const { 304 bool PermissionContextBase::IsPermissionKillSwitchOn() const {
303 const std::string param = variations::GetVariationParamValue( 305 const std::string param = variations::GetVariationParamValue(
304 kPermissionsKillSwitchFieldStudy, 306 kPermissionsKillSwitchFieldStudy,
305 PermissionUtil::GetPermissionString(permission_type_)); 307 PermissionUtil::GetPermissionString(permission_type_));
306 308
307 return param == kPermissionsKillSwitchBlockedValue; 309 return param == kPermissionsKillSwitchBlockedValue;
308 } 310 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/permissions/permissions_browsertest.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698