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

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

Issue 23537011: FileAPI: Add WebFileSystem::resolveURL (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: fix Created 7 years, 3 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) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 { 49 {
50 callbacks->didFail(FileError::ABORT_ERR); 50 callbacks->didFail(FileError::ABORT_ERR);
51 } 51 }
52 52
53 } // namespace 53 } // namespace
54 54
55 LocalFileSystemBase::~LocalFileSystemBase() 55 LocalFileSystemBase::~LocalFileSystemBase()
56 { 56 {
57 } 57 }
58 58
59 void LocalFileSystemBase::readFileSystem(ScriptExecutionContext* context, FileSy stemType type, PassOwnPtr<AsyncFileSystemCallbacks> callbacks) 59 void LocalFileSystemBase::resolveURL(ScriptExecutionContext* context, KURL fileS ystemURL, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
60 { 60 {
61 if (!client() || !client()->allowFileSystem(context)) { 61 if (!client() || !client()->allowFileSystem(context)) {
62 context->postTask(createCallbackTask(&fileSystemNotAllowed, callbacks)); 62 context->postTask(createCallbackTask(&fileSystemNotAllowed, callbacks));
63 return; 63 return;
64 } 64 }
65 client()->openFileSystem(context, type, callbacks, 0, OpenExistingFileSystem ); 65 client()->resolveURL(fileSystemURL, callbacks);
kinuko 2013/09/12 05:58:14 Hmm, looks like we can directly call WebKit::Platf
nhiroki 2013/09/12 09:08:06 Done. I'll make a separate patch for other functio
66 } 66 }
67 67
68 void LocalFileSystemBase::requestFileSystem(ScriptExecutionContext* context, Fil eSystemType type, long long size, PassOwnPtr<AsyncFileSystemCallbacks> callbacks ) 68 void LocalFileSystemBase::requestFileSystem(ScriptExecutionContext* context, Fil eSystemType type, long long size, PassOwnPtr<AsyncFileSystemCallbacks> callbacks )
69 { 69 {
70 if (!client() || !client()->allowFileSystem(context)) { 70 if (!client() || !client()->allowFileSystem(context)) {
71 context->postTask(createCallbackTask(&fileSystemNotAllowed, callbacks)); 71 context->postTask(createCallbackTask(&fileSystemNotAllowed, callbacks));
72 return; 72 return;
73 } 73 }
74 client()->openFileSystem(context, type, callbacks, size, CreateFileSystemIfN otPresent); 74 client()->openFileSystem(context, type, callbacks, size, CreateFileSystemIfN otPresent);
75 } 75 }
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 { 114 {
115 return static_cast<LocalFileSystem*>(Supplement<Page>::from(toDocument(conte xt)->page(), supplementName())); 115 return static_cast<LocalFileSystem*>(Supplement<Page>::from(toDocument(conte xt)->page(), supplementName()));
116 } 116 }
117 117
118 void provideLocalFileSystemTo(Page* page, PassOwnPtr<FileSystemClient> client) 118 void provideLocalFileSystemTo(Page* page, PassOwnPtr<FileSystemClient> client)
119 { 119 {
120 LocalFileSystem::provideTo(page, LocalFileSystem::supplementName(), LocalFil eSystem::create(client)); 120 LocalFileSystem::provideTo(page, LocalFileSystem::supplementName(), LocalFil eSystem::create(client));
121 } 121 }
122 122
123 } // namespace WebCore 123 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/modules/filesystem/LocalFileSystem.h ('k') | Source/modules/filesystem/WorkerGlobalScopeFileSystem.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698