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

Side by Side Diff: content/renderer/render_thread_impl.cc

Issue 647853002: Create a proprietary scheme for loading web-accessible resources. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: msvc fix Created 6 years, 1 month 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 (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 "content/renderer/render_thread_impl.h" 5 #include "content/renderer/render_thread_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <map> 9 #include <map>
10 #include <vector> 10 #include <vector>
(...skipping 956 matching lines...) Expand 10 before | Expand all | Expand 10 after
967 message_loop()->AddTaskObserver(memory_observer_.get()); 967 message_loop()->AddTaskObserver(memory_observer_.get());
968 } 968 }
969 } 969 }
970 970
971 void RenderThreadImpl::RegisterSchemes() { 971 void RenderThreadImpl::RegisterSchemes() {
972 // swappedout: pages should not be accessible, and should also 972 // swappedout: pages should not be accessible, and should also
973 // be treated as empty documents that can commit synchronously. 973 // be treated as empty documents that can commit synchronously.
974 WebString swappedout_scheme(base::ASCIIToUTF16(kSwappedOutScheme)); 974 WebString swappedout_scheme(base::ASCIIToUTF16(kSwappedOutScheme));
975 WebSecurityPolicy::registerURLSchemeAsDisplayIsolated(swappedout_scheme); 975 WebSecurityPolicy::registerURLSchemeAsDisplayIsolated(swappedout_scheme);
976 WebSecurityPolicy::registerURLSchemeAsEmptyDocument(swappedout_scheme); 976 WebSecurityPolicy::registerURLSchemeAsEmptyDocument(swappedout_scheme);
977
978 // This scheme serves resources that may be injected into the
979 // web page (e.g. by Blink). This isn't mixed content, and
980 // content security policy doesn't apply.
981 WebString resource_scheme(base::ASCIIToUTF16(kResourceScheme));
982 WebSecurityPolicy::registerURLSchemeAsSecure(resource_scheme);
983 WebSecurityPolicy::registerURLSchemeAsBypassingContentSecurityPolicy(
Tom Sepez 2014/11/17 18:09:11 Do we need to bypass CSP? For a CSP-enabled web p
jbroman 2014/11/17 18:35:16 The goal is to be able to use this scheme to host
984 resource_scheme);
977 } 985 }
978 986
979 void RenderThreadImpl::NotifyTimezoneChange() { 987 void RenderThreadImpl::NotifyTimezoneChange() {
980 NotifyTimezoneChangeOnThisThread(); 988 NotifyTimezoneChangeOnThisThread();
981 RenderThread::Get()->PostTaskToAllWebWorkers( 989 RenderThread::Get()->PostTaskToAllWebWorkers(
982 base::Bind(&NotifyTimezoneChangeOnThisThread)); 990 base::Bind(&NotifyTimezoneChangeOnThisThread));
983 } 991 }
984 992
985 void RenderThreadImpl::RecordAction(const base::UserMetricsAction& action) { 993 void RenderThreadImpl::RecordAction(const base::UserMetricsAction& action) {
986 Send(new ViewHostMsg_UserMetricsRecordAction(action.str_)); 994 Send(new ViewHostMsg_UserMetricsRecordAction(action.str_));
(...skipping 629 matching lines...) Expand 10 before | Expand all | Expand 10 after
1616 hidden_widget_count_--; 1624 hidden_widget_count_--;
1617 1625
1618 if (!GetContentClient()->renderer()->RunIdleHandlerWhenWidgetsHidden()) { 1626 if (!GetContentClient()->renderer()->RunIdleHandlerWhenWidgetsHidden()) {
1619 return; 1627 return;
1620 } 1628 }
1621 1629
1622 ScheduleIdleHandler(kLongIdleHandlerDelayMs); 1630 ScheduleIdleHandler(kLongIdleHandlerDelayMs);
1623 } 1631 }
1624 1632
1625 } // namespace content 1633 } // namespace content
OLDNEW
« content/browser/resource_protocol_unittest.cc ('K') | « content/public/common/url_constants.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698