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

Side by Side Diff: chrome/browser/ui/webui/media_router/media_router_ui.cc

Issue 2209113002: Change wildcard source expression matching to conform latest spec (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adjust CSP of feedback extension Created 4 years, 4 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 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/media_router/media_router_ui.h" 5 #include "chrome/browser/ui/webui/media_router/media_router_ui.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 176
177 content::WebContents* wc = web_ui->GetWebContents(); 177 content::WebContents* wc = web_ui->GetWebContents();
178 DCHECK(wc); 178 DCHECK(wc);
179 179
180 router_ = 180 router_ =
181 MediaRouterFactory::GetApiForBrowserContext(wc->GetBrowserContext()); 181 MediaRouterFactory::GetApiForBrowserContext(wc->GetBrowserContext());
182 182
183 // Allows UI to load extensionview. 183 // Allows UI to load extensionview.
184 // TODO(haibinlu): limit object-src to current extension once crbug/514866 184 // TODO(haibinlu): limit object-src to current extension once crbug/514866
185 // is fixed. 185 // is fixed.
186 html_source->OverrideContentSecurityPolicyObjectSrc("object-src *;"); 186 html_source->OverrideContentSecurityPolicyObjectSrc("object-src chrome:;");
187 187
188 AddLocalizedStrings(html_source.get()); 188 AddLocalizedStrings(html_source.get());
189 AddMediaRouterUIResources(html_source.get()); 189 AddMediaRouterUIResources(html_source.get());
190 // Ownership of |html_source| is transferred to the BrowserContext. 190 // Ownership of |html_source| is transferred to the BrowserContext.
191 content::WebUIDataSource::Add(Profile::FromWebUI(web_ui), 191 content::WebUIDataSource::Add(Profile::FromWebUI(web_ui),
192 html_source.release()); 192 html_source.release());
193 193
194 // Ownership of |handler_| is transferred to |web_ui|. 194 // Ownership of |handler_| is transferred to |web_ui|.
195 web_ui->AddMessageHandler(handler_); 195 web_ui->AddMessageHandler(handler_);
196 } 196 }
(...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after
698 base::Time::Now() - start_time_); 698 base::Time::Now() - start_time_);
699 start_time_ = base::Time(); 699 start_time_ = base::Time();
700 } 700 }
701 } 701 }
702 702
703 void MediaRouterUI::UpdateMaxDialogHeight(int height) { 703 void MediaRouterUI::UpdateMaxDialogHeight(int height) {
704 handler_->UpdateMaxDialogHeight(height); 704 handler_->UpdateMaxDialogHeight(height);
705 } 705 }
706 706
707 } // namespace media_router 707 } // namespace media_router
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/chromeos/login/oobe_ui.cc ('k') | chrome/browser/ui/webui/signin/inline_login_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698