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

Side by Side Diff: Source/core/page/EventSource.cpp

Issue 1111173002: Removing blink::prefix (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Incorporating Review Comments Created 5 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 | « Source/core/page/ChromeClient.h ('k') | Source/core/page/Page.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009, 2012 Ericsson AB. All rights reserved. 2 * Copyright (C) 2009, 2012 Ericsson AB. All rights reserved.
3 * Copyright (C) 2010 Apple Inc. All rights reserved. 3 * Copyright (C) 2010 Apple Inc. All rights reserved.
4 * Copyright (C) 2011, Code Aurora Forum. All rights reserved. 4 * Copyright (C) 2011, Code Aurora Forum. All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 9 *
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 { 120 {
121 ASSERT(m_state == CONNECTING); 121 ASSERT(m_state == CONNECTING);
122 ASSERT(!m_requestInFlight); 122 ASSERT(!m_requestInFlight);
123 ASSERT(executionContext()); 123 ASSERT(executionContext());
124 124
125 ExecutionContext& executionContext = *this->executionContext(); 125 ExecutionContext& executionContext = *this->executionContext();
126 ResourceRequest request(m_url); 126 ResourceRequest request(m_url);
127 request.setHTTPMethod("GET"); 127 request.setHTTPMethod("GET");
128 request.setHTTPHeaderField("Accept", "text/event-stream"); 128 request.setHTTPHeaderField("Accept", "text/event-stream");
129 request.setHTTPHeaderField("Cache-Control", "no-cache"); 129 request.setHTTPHeaderField("Cache-Control", "no-cache");
130 request.setRequestContext(blink::WebURLRequest::RequestContextEventSource); 130 request.setRequestContext(WebURLRequest::RequestContextEventSource);
131 if (!m_lastEventId.isEmpty()) 131 if (!m_lastEventId.isEmpty())
132 request.setHTTPHeaderField("Last-Event-ID", m_lastEventId); 132 request.setHTTPHeaderField("Last-Event-ID", m_lastEventId);
133 133
134 SecurityOrigin* origin = executionContext.securityOrigin(); 134 SecurityOrigin* origin = executionContext.securityOrigin();
135 135
136 ThreadableLoaderOptions options; 136 ThreadableLoaderOptions options;
137 options.preflightPolicy = PreventPreflight; 137 options.preflightPolicy = PreventPreflight;
138 options.crossOriginRequestPolicy = UseAccessControl; 138 options.crossOriginRequestPolicy = UseAccessControl;
139 options.contentSecurityPolicyEnforcement = ContentSecurityPolicy::shouldBypa ssMainWorld(&executionContext) ? DoNotEnforceContentSecurityPolicy : EnforceConn ectSrcDirective; 139 options.contentSecurityPolicyEnforcement = ContentSecurityPolicy::shouldBypa ssMainWorld(&executionContext) ? DoNotEnforceContentSecurityPolicy : EnforceConn ectSrcDirective;
140 140
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
439 return event.release(); 439 return event.release();
440 } 440 }
441 441
442 DEFINE_TRACE(EventSource) 442 DEFINE_TRACE(EventSource)
443 { 443 {
444 EventTargetWithInlineData::trace(visitor); 444 EventTargetWithInlineData::trace(visitor);
445 ActiveDOMObject::trace(visitor); 445 ActiveDOMObject::trace(visitor);
446 } 446 }
447 447
448 } // namespace blink 448 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/page/ChromeClient.h ('k') | Source/core/page/Page.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698