| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/browser/extensions/component_loader.h" | 5 #include "chrome/browser/extensions/component_loader.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/path_service.h" | 8 #include "base/path_service.h" |
| 9 #include "base/json/json_value_serializer.h" | 9 #include "base/json/json_value_serializer.h" |
| 10 #include "chrome/browser/browser_process.h" | 10 #include "chrome/browser/browser_process.h" |
| 11 #include "chrome/browser/extensions/extension_service.h" | 11 #include "chrome/browser/extensions/extension_service.h" |
| 12 #include "chrome/common/chrome_paths.h" | 12 #include "chrome/common/chrome_paths.h" |
| 13 #include "chrome/common/chrome_switches.h" | 13 #include "chrome/common/chrome_switches.h" |
| 14 #include "chrome/common/extensions/extension.h" | 14 #include "chrome/common/extensions/extension.h" |
| 15 #include "chrome/common/pref_names.h" | 15 #include "chrome/common/pref_names.h" |
| 16 #include "grit/browser_resources.h" | 16 #include "grit/browser_resources.h" |
| 17 #include "ui/base/resource/resource_bundle.h" | 17 #include "ui/base/resource/resource_bundle.h" |
| 18 | 18 |
| 19 #if defined(OFFICIAL_BUILD) |
| 20 #include "chrome/browser/defaults.h" |
| 21 #endif |
| 22 |
| 19 namespace { | 23 namespace { |
| 20 | 24 |
| 21 typedef std::list<std::pair<FilePath::StringType, int> > | 25 typedef std::list<std::pair<FilePath::StringType, int> > |
| 22 ComponentExtensionList; | 26 ComponentExtensionList; |
| 23 | 27 |
| 24 #if defined(FILE_MANAGER_EXTENSION) | 28 #if defined(FILE_MANAGER_EXTENSION) |
| 25 void AddFileManagerExtension(ComponentExtensionList* component_extensions) { | 29 void AddFileManagerExtension(ComponentExtensionList* component_extensions) { |
| 26 #ifndef NDEBUG | 30 #ifndef NDEBUG |
| 27 const CommandLine* command_line = CommandLine::ForCurrentProcess(); | 31 const CommandLine* command_line = CommandLine::ForCurrentProcess(); |
| 28 if (command_line->HasSwitch(switches::kFileManagerExtensionPath)) { | 32 if (command_line->HasSwitch(switches::kFileManagerExtensionPath)) { |
| (...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 215 .AppendASCII(extension_misc::kChromeVoxDirectoryName); | 219 .AppendASCII(extension_misc::kChromeVoxDirectoryName); |
| 216 std::string manifest = | 220 std::string manifest = |
| 217 ResourceBundle::GetSharedInstance().GetRawDataResource( | 221 ResourceBundle::GetSharedInstance().GetRawDataResource( |
| 218 IDR_CHROMEVOX_MANIFEST).as_string(); | 222 IDR_CHROMEVOX_MANIFEST).as_string(); |
| 219 Add(manifest, path); | 223 Add(manifest, path); |
| 220 } | 224 } |
| 221 #endif | 225 #endif |
| 222 } | 226 } |
| 223 | 227 |
| 224 } // namespace extensions | 228 } // namespace extensions |
| OLD | NEW |