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

Side by Side Diff: chrome/browser/ui/webui/chromeos/login/oobe_ui.cc

Issue 2012393003: Replace frame-src with child-src in WebUI CSP (Closed) Base URL: https://chromium.googlesource.com/a/chromium/src.git@csp
Patch Set: Created 4 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
« no previous file with comments | « chrome/browser/search/local_ntp_source.cc ('k') | chrome/browser/ui/webui/ntp/new_tab_ui.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 (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/webui/chromeos/login/oobe_ui.h" 5 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <memory> 9 #include <memory>
10 10
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 source->AddBoolean(kShowPinKey, false); 144 source->AddBoolean(kShowPinKey, false);
145 } else { 145 } else {
146 source->SetDefaultResource(IDR_LOGIN_HTML); 146 source->SetDefaultResource(IDR_LOGIN_HTML);
147 source->AddResourcePath(kLoginJSPath, IDR_LOGIN_JS); 147 source->AddResourcePath(kLoginJSPath, IDR_LOGIN_JS);
148 source->AddResourcePath(kCustomElementsHTMLPath, 148 source->AddResourcePath(kCustomElementsHTMLPath,
149 IDR_CUSTOM_ELEMENTS_LOGIN_HTML); 149 IDR_CUSTOM_ELEMENTS_LOGIN_HTML);
150 source->AddResourcePath(kCustomElementsJSPath, 150 source->AddResourcePath(kCustomElementsJSPath,
151 IDR_CUSTOM_ELEMENTS_LOGIN_JS); 151 IDR_CUSTOM_ELEMENTS_LOGIN_JS);
152 } 152 }
153 source->AddResourcePath(kKeyboardUtilsJSPath, IDR_KEYBOARD_UTILS_JS); 153 source->AddResourcePath(kKeyboardUtilsJSPath, IDR_KEYBOARD_UTILS_JS);
154 source->OverrideContentSecurityPolicyFrameSrc( 154 source->OverrideContentSecurityPolicyChildSrc(
155 base::StringPrintf( 155 base::StringPrintf(
156 "frame-src chrome://terms/ %s/;", 156 "child-src chrome://terms/ %s/;",
157 extensions::kGaiaAuthExtensionOrigin)); 157 extensions::kGaiaAuthExtensionOrigin));
158 source->OverrideContentSecurityPolicyObjectSrc("object-src *;"); 158 source->OverrideContentSecurityPolicyObjectSrc("object-src *;");
159 source->AddResourcePath("gaia_auth_host.js", 159 source->AddResourcePath("gaia_auth_host.js",
160 StartupUtils::IsWebviewSigninEnabled() 160 StartupUtils::IsWebviewSigninEnabled()
161 ? IDR_GAIA_AUTH_AUTHENTICATOR_JS 161 ? IDR_GAIA_AUTH_AUTHENTICATOR_JS
162 : IDR_GAIA_AUTH_HOST_JS); 162 : IDR_GAIA_AUTH_HOST_JS);
163 163
164 // Serve deferred resources. 164 // Serve deferred resources.
165 source->AddResourcePath(kEnrollmentHTMLPath, IDR_OOBE_ENROLLMENT_HTML); 165 source->AddResourcePath(kEnrollmentHTMLPath, IDR_OOBE_ENROLLMENT_HTML);
166 source->AddResourcePath(kEnrollmentCSSPath, IDR_OOBE_ENROLLMENT_CSS); 166 source->AddResourcePath(kEnrollmentCSSPath, IDR_OOBE_ENROLLMENT_CSS);
(...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after
599 NOTIMPLEMENTED(); 599 NOTIMPLEMENTED();
600 } 600 }
601 601
602 FOR_EACH_OBSERVER(Observer, 602 FOR_EACH_OBSERVER(Observer,
603 observer_list_, 603 observer_list_,
604 OnCurrentScreenChanged(current_screen_, new_screen)); 604 OnCurrentScreenChanged(current_screen_, new_screen));
605 current_screen_ = new_screen; 605 current_screen_ = new_screen;
606 } 606 }
607 607
608 } // namespace chromeos 608 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/search/local_ntp_source.cc ('k') | chrome/browser/ui/webui/ntp/new_tab_ui.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698