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

Side by Side Diff: Source/core/fileapi/FileReader.cpp

Issue 18548003: Rename ExceptionCode constants to use the names in the spec (2/3) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/editing/markup.cpp ('k') | Source/core/html/DOMTokenList.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) 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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 if (!blob) 138 if (!blob)
139 return; 139 return;
140 140
141 LOG(FileAPI, "FileReader: reading as data URL: %s %s\n", utf8BlobURL(blob).d ata(), utf8FilePath(blob).data()); 141 LOG(FileAPI, "FileReader: reading as data URL: %s %s\n", utf8BlobURL(blob).d ata(), utf8FilePath(blob).data());
142 142
143 readInternal(blob, FileReaderLoader::ReadAsDataURL, ec); 143 readInternal(blob, FileReaderLoader::ReadAsDataURL, ec);
144 } 144 }
145 145
146 void FileReader::readInternal(Blob* blob, FileReaderLoader::ReadType type, Excep tionCode& ec) 146 void FileReader::readInternal(Blob* blob, FileReaderLoader::ReadType type, Excep tionCode& ec)
147 { 147 {
148 // If multiple concurrent read methods are called on the same FileReader, IN VALID_STATE_ERR should be thrown when the state is LOADING. 148 // If multiple concurrent read methods are called on the same FileReader, In validStateError should be thrown when the state is LOADING.
149 if (m_state == LOADING) { 149 if (m_state == LOADING) {
150 ec = INVALID_STATE_ERR; 150 ec = InvalidStateError;
151 return; 151 return;
152 } 152 }
153 153
154 setPendingActivity(this); 154 setPendingActivity(this);
155 155
156 m_blob = blob; 156 m_blob = blob;
157 m_readType = type; 157 m_readType = type;
158 m_state = LOADING; 158 m_state = LOADING;
159 m_error = 0; 159 m_error = 0;
160 160
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 } 271 }
272 272
273 String FileReader::stringResult() 273 String FileReader::stringResult()
274 { 274 {
275 if (!m_loader || m_error) 275 if (!m_loader || m_error)
276 return String(); 276 return String();
277 return m_loader->stringResult(); 277 return m_loader->stringResult();
278 } 278 }
279 279
280 } // namespace WebCore 280 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/editing/markup.cpp ('k') | Source/core/html/DOMTokenList.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698