| 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 "chrome/common/extensions/api/file_browser_handlers/file_browser_handle
r.h" | 5 #include "chrome/common/extensions/api/file_browser_handlers/file_browser_handle
r.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/strings/string_number_conversions.h" | 8 #include "base/strings/string_number_conversions.h" |
| 9 #include "base/strings/string_util.h" | 9 #include "base/strings/string_util.h" |
| 10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| 11 #include "base/values.h" | 11 #include "base/values.h" |
| 12 #include "chrome/common/extensions/extension_constants.h" | 12 #include "chrome/common/extensions/extension_constants.h" |
| 13 #include "chrome/common/extensions/extension_manifest_constants.h" | 13 #include "chrome/common/extensions/extension_manifest_constants.h" |
| 14 #include "chrome/common/extensions/manifest.h" | 14 #include "chrome/common/extensions/manifest.h" |
| 15 #include "content/public/common/url_constants.h" | 15 #include "content/public/common/url_constants.h" |
| 16 #include "extensions/common/error_utils.h" | 16 #include "extensions/common/error_utils.h" |
| 17 #include "extensions/common/url_pattern.h" | 17 #include "extensions/common/url_pattern.h" |
| 18 | 18 |
| 19 namespace keys = extension_manifest_keys; | 19 namespace keys = extensions::manifest_keys; |
| 20 namespace errors = extension_manifest_errors; | 20 namespace errors = extension_manifest_errors; |
| 21 | 21 |
| 22 namespace { | 22 namespace { |
| 23 | 23 |
| 24 const char kReadAccessString[] = "read"; | 24 const char kReadAccessString[] = "read"; |
| 25 const char kReadWriteAccessString[] = "read-write"; | 25 const char kReadWriteAccessString[] = "read-write"; |
| 26 const char kCreateAccessString[] = "create"; | 26 const char kCreateAccessString[] = "create"; |
| 27 | 27 |
| 28 unsigned int kPermissionsNotDefined = 0; | 28 unsigned int kPermissionsNotDefined = 0; |
| 29 unsigned int kReadPermission = 1; | 29 unsigned int kReadPermission = 1; |
| (...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 281 return false; // Failed to parse file browser actions definition. | 281 return false; // Failed to parse file browser actions definition. |
| 282 } | 282 } |
| 283 | 283 |
| 284 extension->SetManifestData(keys::kFileBrowserHandlers, info.release()); | 284 extension->SetManifestData(keys::kFileBrowserHandlers, info.release()); |
| 285 return true; | 285 return true; |
| 286 } | 286 } |
| 287 | 287 |
| 288 const std::vector<std::string> FileBrowserHandlerParser::Keys() const { | 288 const std::vector<std::string> FileBrowserHandlerParser::Keys() const { |
| 289 return SingleKey(keys::kFileBrowserHandlers); | 289 return SingleKey(keys::kFileBrowserHandlers); |
| 290 } | 290 } |
| OLD | NEW |