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

Side by Side Diff: third_party/WebKit/Source/core/dom/SecurityContext.cpp

Issue 2846843002: [blink] Unique pointers in Platform.h (Closed)
Patch Set: fix compilation (and again) Created 3 years, 7 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All Rights Reserved. 2 * Copyright (C) 2011 Google Inc. All Rights Reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 security_origin_->AddSuborigin(suborigin); 100 security_origin_->AddSuborigin(suborigin);
101 DidUpdateSecurityOrigin(); 101 DidUpdateSecurityOrigin();
102 } 102 }
103 103
104 void SecurityContext::InitializeFeaturePolicy( 104 void SecurityContext::InitializeFeaturePolicy(
105 const WebParsedFeaturePolicy& parsed_header, 105 const WebParsedFeaturePolicy& parsed_header,
106 const WebParsedFeaturePolicy& container_policy, 106 const WebParsedFeaturePolicy& container_policy,
107 const WebFeaturePolicy* parent_feature_policy) { 107 const WebFeaturePolicy* parent_feature_policy) {
108 DCHECK(!feature_policy_); 108 DCHECK(!feature_policy_);
109 WebSecurityOrigin origin = WebSecurityOrigin(security_origin_); 109 WebSecurityOrigin origin = WebSecurityOrigin(security_origin_);
110 feature_policy_.reset(Platform::Current()->CreateFeaturePolicy( 110 feature_policy_ = Platform::Current()->CreateFeaturePolicy(
111 parent_feature_policy, container_policy, parsed_header, origin)); 111 parent_feature_policy, container_policy, parsed_header, origin);
112 } 112 }
113 113
114 void SecurityContext::UpdateFeaturePolicyOrigin() { 114 void SecurityContext::UpdateFeaturePolicyOrigin() {
115 if (!feature_policy_) 115 if (!feature_policy_)
116 return; 116 return;
117 feature_policy_.reset(Platform::Current()->DuplicateFeaturePolicyWithOrigin( 117 feature_policy_ = Platform::Current()->DuplicateFeaturePolicyWithOrigin(
118 *feature_policy_, WebSecurityOrigin(security_origin_))); 118 *feature_policy_, WebSecurityOrigin(security_origin_));
119 } 119 }
120 120
121 } // namespace blink 121 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698