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

Side by Side Diff: content/common/fileapi/file_system_dispatcher.cc

Issue 11227033: Move a bunch of code in content\common (as well as a few left in renderer) to the content namespace. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix cros Created 8 years, 2 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 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/common/fileapi/file_system_dispatcher.h" 5 #include "content/common/fileapi/file_system_dispatcher.h"
6 6
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/process.h" 8 #include "base/process.h"
9 #include "content/common/child_thread.h" 9 #include "content/common/child_thread.h"
10 #include "content/common/fileapi/file_system_messages.h" 10 #include "content/common/fileapi/file_system_messages.h"
11 11
12 namespace content {
13
12 FileSystemDispatcher::FileSystemDispatcher() { 14 FileSystemDispatcher::FileSystemDispatcher() {
13 } 15 }
14 16
15 FileSystemDispatcher::~FileSystemDispatcher() { 17 FileSystemDispatcher::~FileSystemDispatcher() {
16 // Make sure we fire all the remaining callbacks. 18 // Make sure we fire all the remaining callbacks.
17 for (IDMap<fileapi::FileSystemCallbackDispatcher, IDMapOwnPointer>::iterator 19 for (IDMap<fileapi::FileSystemCallbackDispatcher, IDMapOwnPointer>::iterator
18 iter(&dispatchers_); !iter.IsAtEnd(); iter.Advance()) { 20 iter(&dispatchers_); !iter.IsAtEnd(); iter.Advance()) {
19 int request_id = iter.GetCurrentKey(); 21 int request_id = iter.GetCurrentKey();
20 fileapi::FileSystemCallbackDispatcher* dispatcher = iter.GetCurrentValue(); 22 fileapi::FileSystemCallbackDispatcher* dispatcher = iter.GetCurrentValue();
21 DCHECK(dispatcher); 23 DCHECK(dispatcher);
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 } 324 }
323 325
324 void FileSystemDispatcher::OnDidOpenFile( 326 void FileSystemDispatcher::OnDidOpenFile(
325 int request_id, IPC::PlatformFileForTransit file) { 327 int request_id, IPC::PlatformFileForTransit file) {
326 fileapi::FileSystemCallbackDispatcher* dispatcher = 328 fileapi::FileSystemCallbackDispatcher* dispatcher =
327 dispatchers_.Lookup(request_id); 329 dispatchers_.Lookup(request_id);
328 DCHECK(dispatcher); 330 DCHECK(dispatcher);
329 dispatcher->DidOpenFile(IPC::PlatformFileForTransitToPlatformFile(file)); 331 dispatcher->DidOpenFile(IPC::PlatformFileForTransitToPlatformFile(file));
330 dispatchers_.Remove(request_id); 332 dispatchers_.Remove(request_id);
331 } 333 }
334
335 } // namespace content
OLDNEW
« no previous file with comments | « content/common/fileapi/file_system_dispatcher.h ('k') | content/common/fileapi/webblobregistry_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698