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

Unified Diff: runtime/embedders/openglui/emulator/emulator_resource.h

Issue 13042015: Various OpenGLUI changes: (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
Index: runtime/embedders/openglui/emulator/emulator_resource.h
===================================================================
--- runtime/embedders/openglui/emulator/emulator_resource.h (revision 20570)
+++ runtime/embedders/openglui/emulator/emulator_resource.h (working copy)
@@ -8,6 +8,7 @@
#include <fcntl.h>
#include <sys/stat.h>
#include <sys/types.h>
+#include <unistd.h>
#include "embedders/openglui/common/log.h"
#include "embedders/openglui/common/resource.h"
@@ -15,7 +16,7 @@
class EmulatorResource : public Resource {
public:
explicit EmulatorResource(const char* path)
- : base(path),
+ : Resource(path),
fd_(-1) {
}
@@ -28,8 +29,8 @@
off_t length() {
if (length_ < 0) {
- length_ = lseek(fd), 0, SEEK_END);
- lseek(fd), 0, SEEK_START);
+ length_ = lseek(fd_, 0, SEEK_END);
+ lseek(fd_, 0, SEEK_SET);
}
return length_;
}
@@ -51,7 +52,7 @@
}
int32_t Read(void* buffer, size_t count) {
- size_t actual = read(asset_, buffer, count);
+ size_t actual = read(fd_, buffer, count);
return (actual == count) ? 0 : -1;
}

Powered by Google App Engine
This is Rietveld 408576698