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

Side by Side Diff: third_party/WebKit/Source/core/fileapi/FileReaderLoader.cpp

Issue 1773813007: blink: Rename modules/ method to prefix with get when they collide. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: clash-modules: rebase-fixes Created 4 years, 9 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 /* 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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 if (m_urlForReadingIsStream) 75 if (m_urlForReadingIsStream)
76 BlobRegistry::unregisterStreamURL(m_urlForReading); 76 BlobRegistry::unregisterStreamURL(m_urlForReading);
77 else 77 else
78 BlobRegistry::revokePublicBlobURL(m_urlForReading); 78 BlobRegistry::revokePublicBlobURL(m_urlForReading);
79 } 79 }
80 } 80 }
81 81
82 void FileReaderLoader::startInternal(ExecutionContext& executionContext, const S tream* stream, PassRefPtr<BlobDataHandle> blobData) 82 void FileReaderLoader::startInternal(ExecutionContext& executionContext, const S tream* stream, PassRefPtr<BlobDataHandle> blobData)
83 { 83 {
84 // The blob is read by routing through the request handling layer given a te mporary public url. 84 // The blob is read by routing through the request handling layer given a te mporary public url.
85 m_urlForReading = BlobURL::createPublicURL(executionContext.securityOrigin() ); 85 m_urlForReading = BlobURL::createPublicURL(executionContext.getSecurityOrigi n());
86 if (m_urlForReading.isEmpty()) { 86 if (m_urlForReading.isEmpty()) {
87 failed(FileError::SECURITY_ERR); 87 failed(FileError::SECURITY_ERR);
88 return; 88 return;
89 } 89 }
90 90
91 if (blobData) { 91 if (blobData) {
92 ASSERT(!stream); 92 ASSERT(!stream);
93 BlobRegistry::registerPublicBlobURL(executionContext.securityOrigin(), m _urlForReading, blobData); 93 BlobRegistry::registerPublicBlobURL(executionContext.getSecurityOrigin() , m_urlForReading, blobData);
94 } else { 94 } else {
95 ASSERT(stream); 95 ASSERT(stream);
96 BlobRegistry::registerStreamURL(executionContext.securityOrigin(), m_url ForReading, stream->url()); 96 BlobRegistry::registerStreamURL(executionContext.getSecurityOrigin(), m_ urlForReading, stream->url());
97 } 97 }
98 98
99 // Construct and load the request. 99 // Construct and load the request.
100 ResourceRequest request(m_urlForReading); 100 ResourceRequest request(m_urlForReading);
101 request.setExternalRequestStateFromRequestorAddressSpace(executionContext.se curityContext().addressSpace()); 101 request.setExternalRequestStateFromRequestorAddressSpace(executionContext.se curityContext().addressSpace());
102 102
103 // FIXME: Should this really be 'internal'? Do we know anything about the ac tual request that generated this fetch? 103 // FIXME: Should this really be 'internal'? Do we know anything about the ac tual request that generated this fetch?
104 request.setRequestContext(WebURLRequest::RequestContextInternal); 104 request.setRequestContext(WebURLRequest::RequestContextInternal);
105 105
106 request.setHTTPMethod(HTTPNames::GET); 106 request.setHTTPMethod(HTTPNames::GET);
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
402 m_stringResult = builder.toString(); 402 m_stringResult = builder.toString();
403 } 403 }
404 404
405 void FileReaderLoader::setEncoding(const String& encoding) 405 void FileReaderLoader::setEncoding(const String& encoding)
406 { 406 {
407 if (!encoding.isEmpty()) 407 if (!encoding.isEmpty())
408 m_encoding = WTF::TextEncoding(encoding); 408 m_encoding = WTF::TextEncoding(encoding);
409 } 409 }
410 410
411 } // namespace blink 411 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/fileapi/FileReader.cpp ('k') | third_party/WebKit/Source/core/frame/DOMTimer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698