| OLD | NEW |
| 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 #include "extensions/common/constants.h" | 5 #include "extensions/common/constants.h" |
| 6 | 6 |
| 7 #include "base/files/file_path.h" | 7 #include "base/files/file_path.h" |
| 8 #include "url/gurl.h" |
| 8 | 9 |
| 9 namespace extensions { | 10 namespace extensions { |
| 10 | 11 |
| 11 const char kExtensionScheme[] = "chrome-extension"; | 12 const char kExtensionScheme[] = "chrome-extension"; |
| 12 | 13 |
| 13 const base::FilePath::CharType kManifestFilename[] = | 14 const base::FilePath::CharType kManifestFilename[] = |
| 14 FILE_PATH_LITERAL("manifest.json"); | 15 FILE_PATH_LITERAL("manifest.json"); |
| 15 const base::FilePath::CharType kLocaleFolder[] = | 16 const base::FilePath::CharType kLocaleFolder[] = |
| 16 FILE_PATH_LITERAL("_locales"); | 17 FILE_PATH_LITERAL("_locales"); |
| 17 const base::FilePath::CharType kMessagesFilename[] = | 18 const base::FilePath::CharType kMessagesFilename[] = |
| (...skipping 12 matching lines...) Expand all Loading... |
| 30 const char kGeneratedBackgroundPageFilename[] = | 31 const char kGeneratedBackgroundPageFilename[] = |
| 31 "_generated_background_page.html"; | 32 "_generated_background_page.html"; |
| 32 | 33 |
| 33 const char kModulesDir[] = "_modules"; | 34 const char kModulesDir[] = "_modules"; |
| 34 | 35 |
| 35 const base::FilePath::CharType kExtensionFileExtension[] = | 36 const base::FilePath::CharType kExtensionFileExtension[] = |
| 36 FILE_PATH_LITERAL(".crx"); | 37 FILE_PATH_LITERAL(".crx"); |
| 37 const base::FilePath::CharType kExtensionKeyFileExtension[] = | 38 const base::FilePath::CharType kExtensionKeyFileExtension[] = |
| 38 FILE_PATH_LITERAL(".pem"); | 39 FILE_PATH_LITERAL(".pem"); |
| 39 | 40 |
| 41 bool IsSourceFromAnExtension(const base::string16& source) { |
| 42 return GURL(source).SchemeIs(kExtensionScheme); |
| 43 } |
| 44 |
| 40 } // namespace extensions | 45 } // namespace extensions |
| OLD | NEW |