| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "storage/browser/fileapi/plugin_private_file_system_backend.h" | 5 #include "storage/browser/fileapi/plugin_private_file_system_backend.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 NOTREACHED() << "Unsupported url is given: " << url.DebugString(); | 41 NOTREACHED() << "Unsupported url is given: " << url.DebugString(); |
| 42 return std::string(); | 42 return std::string(); |
| 43 } | 43 } |
| 44 return found->second; | 44 return found->second; |
| 45 } | 45 } |
| 46 | 46 |
| 47 void RegisterFileSystem(const std::string& filesystem_id, | 47 void RegisterFileSystem(const std::string& filesystem_id, |
| 48 const std::string& plugin_id) { | 48 const std::string& plugin_id) { |
| 49 DCHECK(task_runner_->RunsTasksOnCurrentThread()); | 49 DCHECK(task_runner_->RunsTasksOnCurrentThread()); |
| 50 DCHECK(!filesystem_id.empty()); | 50 DCHECK(!filesystem_id.empty()); |
| 51 DCHECK(!ContainsKey(map_, filesystem_id)) << filesystem_id; | 51 DCHECK(!base::ContainsKey(map_, filesystem_id)) << filesystem_id; |
| 52 map_[filesystem_id] = plugin_id; | 52 map_[filesystem_id] = plugin_id; |
| 53 } | 53 } |
| 54 | 54 |
| 55 void RemoveFileSystem(const std::string& filesystem_id) { | 55 void RemoveFileSystem(const std::string& filesystem_id) { |
| 56 DCHECK(task_runner_->RunsTasksOnCurrentThread()); | 56 DCHECK(task_runner_->RunsTasksOnCurrentThread()); |
| 57 map_.erase(filesystem_id); | 57 map_.erase(filesystem_id); |
| 58 } | 58 } |
| 59 | 59 |
| 60 private: | 60 private: |
| 61 typedef std::map<std::string, std::string> Map; | 61 typedef std::map<std::string, std::string> Map; |
| (...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 293 FileSystemType type) const { | 293 FileSystemType type) const { |
| 294 return NULL; | 294 return NULL; |
| 295 } | 295 } |
| 296 | 296 |
| 297 ObfuscatedFileUtil* PluginPrivateFileSystemBackend::obfuscated_file_util() { | 297 ObfuscatedFileUtil* PluginPrivateFileSystemBackend::obfuscated_file_util() { |
| 298 return static_cast<ObfuscatedFileUtil*>( | 298 return static_cast<ObfuscatedFileUtil*>( |
| 299 static_cast<AsyncFileUtilAdapter*>(file_util_.get())->sync_file_util()); | 299 static_cast<AsyncFileUtilAdapter*>(file_util_.get())->sync_file_util()); |
| 300 } | 300 } |
| 301 | 301 |
| 302 } // namespace storage | 302 } // namespace storage |
| OLD | NEW |