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

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

Issue 314333002: Enable Oilpan by default in modules/filesystem/ (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Tidy up Created 6 years, 6 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
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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 #include "modules/filesystem/FileWriterBaseCallback.h" 43 #include "modules/filesystem/FileWriterBaseCallback.h"
44 #include "modules/filesystem/FileWriterSync.h" 44 #include "modules/filesystem/FileWriterSync.h"
45 #include "platform/FileMetadata.h" 45 #include "platform/FileMetadata.h"
46 #include "public/platform/WebFileSystem.h" 46 #include "public/platform/WebFileSystem.h"
47 #include "public/platform/WebFileSystemCallbacks.h" 47 #include "public/platform/WebFileSystemCallbacks.h"
48 48
49 namespace WebCore { 49 namespace WebCore {
50 50
51 class FileWriterBase; 51 class FileWriterBase;
52 52
53 PassRefPtrWillBeRawPtr<DOMFileSystemSync> DOMFileSystemSync::create(DOMFileSyste mBase* fileSystem) 53 DOMFileSystemSync* DOMFileSystemSync::create(DOMFileSystemBase* fileSystem)
54 { 54 {
55 return adoptRefWillBeRefCountedGarbageCollected(new DOMFileSystemSync(fileSy stem->m_context, fileSystem->name(), fileSystem->type(), fileSystem->rootURL())) ; 55 return new DOMFileSystemSync(fileSystem->m_context, fileSystem->name(), file System->type(), fileSystem->rootURL());
56 } 56 }
57 57
58 DOMFileSystemSync::DOMFileSystemSync(ExecutionContext* context, const String& na me, FileSystemType type, const KURL& rootURL) 58 DOMFileSystemSync::DOMFileSystemSync(ExecutionContext* context, const String& na me, FileSystemType type, const KURL& rootURL)
59 : DOMFileSystemBase(context, name, type, rootURL) 59 : DOMFileSystemBase(context, name, type, rootURL)
60 { 60 {
61 ScriptWrappable::init(this); 61 ScriptWrappable::init(this);
62 } 62 }
63 63
64 DOMFileSystemSync::~DOMFileSystemSync() 64 DOMFileSystemSync::~DOMFileSystemSync()
65 { 65 {
66 } 66 }
67 67
68 void DOMFileSystemSync::reportError(PassOwnPtr<ErrorCallback> errorCallback, Pas sRefPtrWillBeRawPtr<FileError> fileError) 68 void DOMFileSystemSync::reportError(PassOwnPtr<ErrorCallback> errorCallback, Pas sRefPtrWillBeRawPtr<FileError> fileError)
69 { 69 {
70 errorCallback->handleEvent(fileError.get()); 70 errorCallback->handleEvent(fileError.get());
71 } 71 }
72 72
73 PassRefPtrWillBeRawPtr<DirectoryEntrySync> DOMFileSystemSync::root() 73 DirectoryEntrySync* DOMFileSystemSync::root()
74 { 74 {
75 return DirectoryEntrySync::create(this, DOMFilePath::root); 75 return DirectoryEntrySync::create(this, DOMFilePath::root);
76 } 76 }
77 77
78 namespace { 78 namespace {
79 79
80 class CreateFileHelper FINAL : public AsyncFileSystemCallbacks { 80 class CreateFileHelper FINAL : public AsyncFileSystemCallbacks {
81 public: 81 public:
82 class CreateFileResult : public RefCountedWillBeGarbageCollected<CreateFileR esult> { 82 class CreateFileResult : public RefCountedWillBeGarbageCollected<CreateFileR esult> {
83 public: 83 public:
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 240
241 fileSystem()->createFileWriter(createFileSystemURL(fileEntry), fileWriter.ge t(), callbacks.release()); 241 fileSystem()->createFileWriter(createFileSystemURL(fileEntry), fileWriter.ge t(), callbacks.release());
242 if (errorCode != FileError::OK) { 242 if (errorCode != FileError::OK) {
243 FileError::throwDOMException(exceptionState, errorCode); 243 FileError::throwDOMException(exceptionState, errorCode);
244 return nullptr; 244 return nullptr;
245 } 245 }
246 return fileWriter.release(); 246 return fileWriter.release();
247 } 247 }
248 248
249 } 249 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698