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

Side by Side Diff: chrome/browser/media_gallery/media_file_system_registry.cc

Issue 10829136: Adding RevokeFileSystemByPath (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | webkit/fileapi/isolated_context.h » ('j') | webkit/fileapi/isolated_context.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 // MediaFileSystemRegistry implementation. 5 // MediaFileSystemRegistry implementation.
6 6
7 #include "chrome/browser/media_gallery/media_file_system_registry.h" 7 #include "chrome/browser/media_gallery/media_file_system_registry.h"
8 8
9 #include <set> 9 #include <set>
10 10
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 IsolatedContext::GetInstance()->RegisterFileSystemForPath( 175 IsolatedContext::GetInstance()->RegisterFileSystemForPath(
176 fileapi::kFileSystemTypeIsolated, path, &register_name); 176 fileapi::kFileSystemTypeIsolated, path, &register_name);
177 CHECK(!fsid.empty()); 177 CHECK(!fsid.empty());
178 return fsid; 178 return fsid;
179 } 179 }
180 180
181 void MediaFileSystemRegistry::RevokeMediaFileSystem(const FilePath& path) { 181 void MediaFileSystemRegistry::RevokeMediaFileSystem(const FilePath& path) {
182 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 182 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
183 183
184 IsolatedContext* isolated_context = IsolatedContext::GetInstance(); 184 IsolatedContext* isolated_context = IsolatedContext::GetInstance();
185 isolated_context->RevokeFileSystemByPath(path);
186
185 for (ChildIdToMediaFSMap::iterator child_it = media_fs_map_.begin(); 187 for (ChildIdToMediaFSMap::iterator child_it = media_fs_map_.begin();
186 child_it != media_fs_map_.end(); 188 child_it != media_fs_map_.end();
187 ++child_it) { 189 ++child_it) {
188 MediaPathToFSIDMap& child_map = child_it->second; 190 MediaPathToFSIDMap& child_map = child_it->second;
189 MediaPathToFSIDMap::iterator media_path_it = child_map.find(path); 191 MediaPathToFSIDMap::iterator media_path_it = child_map.find(path);
190 if (media_path_it == child_map.end()) 192 if (media_path_it == child_map.end())
191 continue; 193 continue;
192 isolated_context->RevokeFileSystem(media_path_it->second);
193 child_map.erase(media_path_it); 194 child_map.erase(media_path_it);
194 } 195 }
195 } 196 }
196 197
197 } // namespace chrome 198 } // namespace chrome
OLDNEW
« no previous file with comments | « no previous file | webkit/fileapi/isolated_context.h » ('j') | webkit/fileapi/isolated_context.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698