| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2013, Intel Corporation | 3 * Copyright (C) 2013, Intel Corporation |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
| 7 * met: | 7 * met: |
| 8 * | 8 * |
| 9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 { | 82 { |
| 83 return WebDataConsumerHandle::UnexpectedError; | 83 return WebDataConsumerHandle::UnexpectedError; |
| 84 } | 84 } |
| 85 void notify(WebDataConsumerHandle::Client* client) | 85 void notify(WebDataConsumerHandle::Client* client) |
| 86 { | 86 { |
| 87 client->didGetReadable(); | 87 client->didGetReadable(); |
| 88 } | 88 } |
| 89 WeakPtrFactory<EmptyDataReader> m_factory; | 89 WeakPtrFactory<EmptyDataReader> m_factory; |
| 90 }; | 90 }; |
| 91 | 91 |
| 92 Reader* obtainReaderInternal(Client* client) override | 92 std::unique_ptr<Reader> obtainReader(Client* client) override |
| 93 { | 93 { |
| 94 return new EmptyDataReader(client); | 94 return WTF::wrapUnique(new EmptyDataReader(client)); |
| 95 } | 95 } |
| 96 const char* debugName() const override { return "EmptyDataHandle"; } | 96 const char* debugName() const override { return "EmptyDataHandle"; } |
| 97 }; | 97 }; |
| 98 | 98 |
| 99 // No-CORS requests are allowed for all these contexts, and plugin contexts with | 99 // No-CORS requests are allowed for all these contexts, and plugin contexts with |
| 100 // private permission when we set skipServiceWorker flag in PepperURLLoaderHost. | 100 // private permission when we set skipServiceWorker flag in PepperURLLoaderHost. |
| 101 bool IsNoCORSAllowedContext(WebURLRequest::RequestContext context, WebURLRequest
::SkipServiceWorker skipServiceWorker) | 101 bool IsNoCORSAllowedContext(WebURLRequest::RequestContext context, WebURLRequest
::SkipServiceWorker skipServiceWorker) |
| 102 { | 102 { |
| 103 switch (context) { | 103 switch (context) { |
| 104 case WebURLRequest::RequestContextAudio: | 104 case WebURLRequest::RequestContextAudio: |
| (...skipping 910 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1015 return m_securityOrigin ? m_securityOrigin.get() : document().getSecurityOri
gin(); | 1015 return m_securityOrigin ? m_securityOrigin.get() : document().getSecurityOri
gin(); |
| 1016 } | 1016 } |
| 1017 | 1017 |
| 1018 Document& DocumentThreadableLoader::document() const | 1018 Document& DocumentThreadableLoader::document() const |
| 1019 { | 1019 { |
| 1020 ASSERT(m_document); | 1020 ASSERT(m_document); |
| 1021 return *m_document; | 1021 return *m_document; |
| 1022 } | 1022 } |
| 1023 | 1023 |
| 1024 } // namespace blink | 1024 } // namespace blink |
| OLD | NEW |