Chromium Code Reviews| Index: ppapi/shared_impl/file_system_util.cc |
| diff --git a/ppapi/shared_impl/file_system_util.cc b/ppapi/shared_impl/file_system_util.cc |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..ba103910580f433c4fd8f9d315d9e3c8f7348217 |
| --- /dev/null |
| +++ b/ppapi/shared_impl/file_system_util.cc |
| @@ -0,0 +1,25 @@ |
| +// Copyright 2013 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#include "ppapi/shared_impl/file_system_util.h" |
| + |
| +#include "base/logging.h" |
| + |
| +namespace ppapi { |
| + |
| +std::string IsolatedFileSystemTypeToRootName( |
| + PP_IsolatedFileSystemType_Private type) { |
| + switch (type) { |
| + case PP_ISOLATEDFILESYSTEMTYPE_PRIVATE_INVALID: |
|
teravest
2013/11/12 18:04:53
Why bother explicitly handling this case?
nhiroki
2013/11/14 11:34:39
It's just my preference ('default' could hide newl
|
| + break; |
| + case PP_ISOLATEDFILESYSTEMTYPE_PRIVATE_CRX: |
| + return "crxfs"; |
| + case PP_ISOLATEDFILESYSTEMTYPE_PRIVATE_PLUGINPRIVATE: |
| + return "pluginprivate"; |
| + } |
| + NOTREACHED() << type; |
| + return std::string(); |
| +} |
| + |
| +} // namespace ppapi |