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

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

Issue 464353002: Cleanup blink:: prefix usage in Source/core/modules/[battery/*.cpp to indexeddb/*.cpp] (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 6 years, 4 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
« no previous file with comments | « Source/modules/filesystem/FileWriter.cpp ('k') | Source/modules/filesystem/FileWriterSync.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 25 matching lines...) Expand all
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 blink { 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<WebFileWriter> writer, long long leng th)
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 blink 70 } // namespace blink
OLDNEW
« no previous file with comments | « Source/modules/filesystem/FileWriter.cpp ('k') | Source/modules/filesystem/FileWriterSync.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698