| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 | 151 |
| 152 static void addDataToStreamTask(const KURL& url, PassRefPtr<RawData> streamData) | 152 static void addDataToStreamTask(const KURL& url, PassRefPtr<RawData> streamData) |
| 153 { | 153 { |
| 154 if (WebBlobRegistry* registry = blobRegistry()) | 154 if (WebBlobRegistry* registry = blobRegistry()) |
| 155 registry->addDataToStream(url, streamData->data(), streamData->length())
; | 155 registry->addDataToStream(url, streamData->data(), streamData->length())
; |
| 156 } | 156 } |
| 157 | 157 |
| 158 void BlobRegistry::addDataToStream(const KURL& url, PassRefPtr<RawData> streamDa
ta) | 158 void BlobRegistry::addDataToStream(const KURL& url, PassRefPtr<RawData> streamDa
ta) |
| 159 { | 159 { |
| 160 if (isMainThread()) | 160 if (isMainThread()) |
| 161 addDataToStreamTask(url, streamData); | 161 addDataToStreamTask(url, std::move(streamData)); |
| 162 else | 162 else |
| 163 Platform::current()->mainThread()->getWebTaskRunner()->postTask(BLINK_FR
OM_HERE, crossThreadBind(&addDataToStreamTask, url, streamData)); | 163 Platform::current()->mainThread()->getWebTaskRunner()->postTask(BLINK_FR
OM_HERE, crossThreadBind(&addDataToStreamTask, url, streamData)); |
| 164 } | 164 } |
| 165 | 165 |
| 166 static void flushStreamTask(const KURL& url) | 166 static void flushStreamTask(const KURL& url) |
| 167 { | 167 { |
| 168 if (WebBlobRegistry* registry = blobRegistry()) | 168 if (WebBlobRegistry* registry = blobRegistry()) |
| 169 registry->flushStream(url); | 169 registry->flushStream(url); |
| 170 } | 170 } |
| 171 | 171 |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 227 } | 227 } |
| 228 | 228 |
| 229 SecurityOrigin* BlobOriginMap::getOrigin(const KURL& url) | 229 SecurityOrigin* BlobOriginMap::getOrigin(const KURL& url) |
| 230 { | 230 { |
| 231 if (url.protocolIs("blob")) | 231 if (url.protocolIs("blob")) |
| 232 return originMap()->get(url.getString()); | 232 return originMap()->get(url.getString()); |
| 233 return 0; | 233 return 0; |
| 234 } | 234 } |
| 235 | 235 |
| 236 } // namespace blink | 236 } // namespace blink |
| OLD | NEW |