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

Side by Side Diff: third_party/WebKit/Source/modules/filesystem/DraggedIsolatedFileSystemImpl.cpp

Issue 2701993002: DO NOT COMMIT: Results of running new (proposed) clang-format on Blink (Closed)
Patch Set: Created 3 years, 10 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) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 if (!item.hasFileSystemId()) 44 if (!item.hasFileSystemId())
45 return nullptr; 45 return nullptr;
46 const String fileSystemId = item.fileSystemId(); 46 const String fileSystemId = item.fileSystemId();
47 DraggedIsolatedFileSystemImpl* draggedIsolatedFileSystem = from(host); 47 DraggedIsolatedFileSystemImpl* draggedIsolatedFileSystem = from(host);
48 if (!draggedIsolatedFileSystem) 48 if (!draggedIsolatedFileSystem)
49 return nullptr; 49 return nullptr;
50 auto it = draggedIsolatedFileSystem->m_filesystems.find(fileSystemId); 50 auto it = draggedIsolatedFileSystem->m_filesystems.find(fileSystemId);
51 if (it != draggedIsolatedFileSystem->m_filesystems.end()) 51 if (it != draggedIsolatedFileSystem->m_filesystems.end())
52 return it->value; 52 return it->value;
53 return draggedIsolatedFileSystem->m_filesystems 53 return draggedIsolatedFileSystem->m_filesystems
54 .insert(fileSystemId, DOMFileSystem::createIsolatedFileSystem( 54 .insert(fileSystemId,
55 executionContext, fileSystemId)) 55 DOMFileSystem::createIsolatedFileSystem(executionContext,
56 fileSystemId))
56 .storedValue->value; 57 .storedValue->value;
57 } 58 }
58 59
59 // static 60 // static
60 const char* DraggedIsolatedFileSystemImpl::supplementName() { 61 const char* DraggedIsolatedFileSystemImpl::supplementName() {
61 ASSERT(isMainThread()); 62 ASSERT(isMainThread());
62 return "DraggedIsolatedFileSystemImpl"; 63 return "DraggedIsolatedFileSystemImpl";
63 } 64 }
64 65
65 DraggedIsolatedFileSystemImpl* DraggedIsolatedFileSystemImpl::from( 66 DraggedIsolatedFileSystemImpl* DraggedIsolatedFileSystemImpl::from(
66 DataObject* dataObject) { 67 DataObject* dataObject) {
67 return static_cast<DraggedIsolatedFileSystemImpl*>( 68 return static_cast<DraggedIsolatedFileSystemImpl*>(
68 Supplement<DataObject>::from(dataObject, supplementName())); 69 Supplement<DataObject>::from(dataObject, supplementName()));
69 } 70 }
70 71
71 DEFINE_TRACE(DraggedIsolatedFileSystemImpl) { 72 DEFINE_TRACE(DraggedIsolatedFileSystemImpl) {
72 visitor->trace(m_filesystems); 73 visitor->trace(m_filesystems);
73 Supplement<DataObject>::trace(visitor); 74 Supplement<DataObject>::trace(visitor);
74 } 75 }
75 76
76 void DraggedIsolatedFileSystemImpl::prepareForDataObject( 77 void DraggedIsolatedFileSystemImpl::prepareForDataObject(
77 DataObject* dataObject) { 78 DataObject* dataObject) {
78 DraggedIsolatedFileSystemImpl* fileSystem = 79 DraggedIsolatedFileSystemImpl* fileSystem =
79 new DraggedIsolatedFileSystemImpl(); 80 new DraggedIsolatedFileSystemImpl();
80 DraggedIsolatedFileSystemImpl::provideTo( 81 DraggedIsolatedFileSystemImpl::provideTo(
81 *dataObject, DraggedIsolatedFileSystemImpl::supplementName(), fileSystem); 82 *dataObject, DraggedIsolatedFileSystemImpl::supplementName(), fileSystem);
82 } 83 }
83 84
84 } // namespace blink 85 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698