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

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: build fix!! 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') | no next file with comments »
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 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 IsolatedContext::GetInstance()->RegisterFileSystemForPath( 179 IsolatedContext::GetInstance()->RegisterFileSystemForPath(
180 fileapi::kFileSystemTypeIsolated, path, &register_name); 180 fileapi::kFileSystemTypeIsolated, path, &register_name);
181 CHECK(!fsid.empty()); 181 CHECK(!fsid.empty());
182 return fsid; 182 return fsid;
183 } 183 }
184 184
185 void MediaFileSystemRegistry::RevokeMediaFileSystem(const FilePath& path) { 185 void MediaFileSystemRegistry::RevokeMediaFileSystem(const FilePath& path) {
186 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 186 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
187 187
188 IsolatedContext* isolated_context = IsolatedContext::GetInstance(); 188 IsolatedContext* isolated_context = IsolatedContext::GetInstance();
189 isolated_context->RevokeFileSystemByPath(path);
190
189 for (ChildIdToMediaFSMap::iterator child_it = media_fs_map_.begin(); 191 for (ChildIdToMediaFSMap::iterator child_it = media_fs_map_.begin();
190 child_it != media_fs_map_.end(); 192 child_it != media_fs_map_.end();
191 ++child_it) { 193 ++child_it) {
192 MediaPathToFSIDMap& child_map = child_it->second; 194 MediaPathToFSIDMap& child_map = child_it->second;
193 MediaPathToFSIDMap::iterator media_path_it = child_map.find(path); 195 MediaPathToFSIDMap::iterator media_path_it = child_map.find(path);
194 if (media_path_it == child_map.end()) 196 if (media_path_it == child_map.end())
195 continue; 197 continue;
196 isolated_context->RevokeFileSystem(media_path_it->second);
197 child_map.erase(media_path_it); 198 child_map.erase(media_path_it);
198 } 199 }
199 } 200 }
200 201
201 } // namespace chrome 202 } // namespace chrome
OLDNEW
« no previous file with comments | « no previous file | webkit/fileapi/isolated_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698