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

Side by Side Diff: Source/core/fileapi/FileReaderLoader.h

Issue 17761003: Remove FileException (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix compile warning 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/fileapi/FileReader.cpp ('k') | Source/core/fileapi/FileReaderLoader.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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 virtual void didFinishLoading(unsigned long, double); 69 virtual void didFinishLoading(unsigned long, double);
70 virtual void didFail(const ResourceError&); 70 virtual void didFail(const ResourceError&);
71 71
72 String stringResult(); 72 String stringResult();
73 PassRefPtr<ArrayBuffer> arrayBufferResult() const; 73 PassRefPtr<ArrayBuffer> arrayBufferResult() const;
74 #if ENABLE(STREAM) 74 #if ENABLE(STREAM)
75 PassRefPtr<Blob> blobResult(); 75 PassRefPtr<Blob> blobResult();
76 #endif // ENABLE(STREAM) 76 #endif // ENABLE(STREAM)
77 unsigned bytesLoaded() const { return m_bytesLoaded; } 77 unsigned bytesLoaded() const { return m_bytesLoaded; }
78 unsigned totalBytes() const { return m_totalBytes; } 78 unsigned totalBytes() const { return m_totalBytes; }
79 int errorCode() const { return m_errorCode; } 79 FileError::ErrorCode errorCode() const { return m_errorCode; }
80 80
81 void setEncoding(const String&); 81 void setEncoding(const String&);
82 void setDataType(const String& dataType) { m_dataType = dataType; } 82 void setDataType(const String& dataType) { m_dataType = dataType; }
83 #if ENABLE(STREAM) 83 #if ENABLE(STREAM)
84 void setRange(unsigned, unsigned); 84 void setRange(unsigned, unsigned);
85 #endif // ENABLE(STREAM) 85 #endif // ENABLE(STREAM)
86 86
87 private: 87 private:
88 void terminate(); 88 void terminate();
89 void cleanup(); 89 void cleanup();
90 void failed(int errorCode); 90 void failed(FileError::ErrorCode);
91 void convertToText(); 91 void convertToText();
92 void convertToDataURL(); 92 void convertToDataURL();
93 93
94 bool isCompleted() const; 94 bool isCompleted() const;
95 95
96 static FileError::ErrorCode httpStatusCodeToErrorCode(int); 96 static FileError::ErrorCode httpStatusCodeToErrorCode(int);
97 97
98 ReadType m_readType; 98 ReadType m_readType;
99 FileReaderLoaderClient* m_client; 99 FileReaderLoaderClient* m_client;
100 WTF::TextEncoding m_encoding; 100 WTF::TextEncoding m_encoding;
(...skipping 12 matching lines...) Expand all
113 RefPtr<TextResourceDecoder> m_decoder; 113 RefPtr<TextResourceDecoder> m_decoder;
114 114
115 bool m_variableLength; 115 bool m_variableLength;
116 unsigned m_bytesLoaded; 116 unsigned m_bytesLoaded;
117 unsigned m_totalBytes; 117 unsigned m_totalBytes;
118 118
119 bool m_hasRange; 119 bool m_hasRange;
120 unsigned m_rangeStart; 120 unsigned m_rangeStart;
121 unsigned m_rangeEnd; 121 unsigned m_rangeEnd;
122 122
123 int m_errorCode; 123 FileError::ErrorCode m_errorCode;
124 }; 124 };
125 125
126 } // namespace WebCore 126 } // namespace WebCore
127 127
128 #endif // FileReaderLoader_h 128 #endif // FileReaderLoader_h
OLDNEW
« no previous file with comments | « Source/core/fileapi/FileReader.cpp ('k') | Source/core/fileapi/FileReaderLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698