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

Side by Side Diff: Source/modules/filesystem/FileWriterBase.cpp

Issue 403013002: Rename WebCore to blink in Modules (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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
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 19 matching lines...) Expand all
30 30
31 #include "config.h" 31 #include "config.h"
32 32
33 #include "modules/filesystem/FileWriterBase.h" 33 #include "modules/filesystem/FileWriterBase.h"
34 34
35 #include "core/events/ProgressEvent.h" 35 #include "core/events/ProgressEvent.h"
36 #include "core/fileapi/Blob.h" 36 #include "core/fileapi/Blob.h"
37 #include "core/fileapi/FileError.h" 37 #include "core/fileapi/FileError.h"
38 #include "public/platform/WebFileWriter.h" 38 #include "public/platform/WebFileWriter.h"
39 39
40 namespace WebCore { 40 namespace blink {
41 41
42 FileWriterBase::~FileWriterBase() 42 FileWriterBase::~FileWriterBase()
43 { 43 {
44 } 44 }
45 45
46 void FileWriterBase::initialize(PassOwnPtr<blink::WebFileWriter> writer, long lo ng length) 46 void FileWriterBase::initialize(PassOwnPtr<blink::WebFileWriter> writer, long lo ng length)
47 { 47 {
48 ASSERT(!m_writer); 48 ASSERT(!m_writer);
49 ASSERT(length >= 0); 49 ASSERT(length >= 0);
50 m_writer = writer; 50 m_writer = writer;
51 m_length = length; 51 m_length = length;
52 } 52 }
53 53
54 FileWriterBase::FileWriterBase() 54 FileWriterBase::FileWriterBase()
55 : m_position(0) 55 : m_position(0)
56 { 56 {
57 } 57 }
58 58
59 void FileWriterBase::seekInternal(long long position) 59 void FileWriterBase::seekInternal(long long position)
60 { 60 {
61 if (position > m_length) 61 if (position > m_length)
62 position = m_length; 62 position = m_length;
63 else if (position < 0) 63 else if (position < 0)
64 position = m_length + position; 64 position = m_length + position;
65 if (position < 0) 65 if (position < 0)
66 position = 0; 66 position = 0;
67 m_position = position; 67 m_position = position;
68 } 68 }
69 69
70 } // namespace WebCore 70 } // namespace blink
OLDNEW
« no previous file with comments | « Source/modules/filesystem/FileWriterBase.h ('k') | Source/modules/filesystem/FileWriterBaseCallback.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698