Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(36)

Side by Side Diff: chrome/browser/extensions/component_loader.cc

Issue 143733002: Remove FILE_MANAGER_EXTENSION and related configuration. They can be folded back to Chrome OS as co… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove FILE_MANAGER_EXTENSION and related configuration. They can be folded back to Chrome OS as co… Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 "chrome/browser/extensions/component_loader.h" 5 #include "chrome/browser/extensions/component_loader.h"
6 6
7 #include <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 bool ComponentLoader::Exists(const std::string& id) const { 265 bool ComponentLoader::Exists(const std::string& id) const {
266 RegisteredComponentExtensions::const_iterator it = 266 RegisteredComponentExtensions::const_iterator it =
267 component_extensions_.begin(); 267 component_extensions_.begin();
268 for (; it != component_extensions_.end(); ++it) 268 for (; it != component_extensions_.end(); ++it)
269 if (it->extension_id == id) 269 if (it->extension_id == id)
270 return true; 270 return true;
271 return false; 271 return false;
272 } 272 }
273 273
274 void ComponentLoader::AddFileManagerExtension() { 274 void ComponentLoader::AddFileManagerExtension() {
275 #if defined(FILE_MANAGER_EXTENSION) 275 #if defined(OS_CHROMEOS)
276 #ifndef NDEBUG 276 #ifndef NDEBUG
277 const CommandLine* command_line = CommandLine::ForCurrentProcess(); 277 const CommandLine* command_line = CommandLine::ForCurrentProcess();
278 if (command_line->HasSwitch(switches::kFileManagerExtensionPath)) { 278 if (command_line->HasSwitch(switches::kFileManagerExtensionPath)) {
279 base::FilePath filemgr_extension_path( 279 base::FilePath filemgr_extension_path(
280 command_line->GetSwitchValuePath(switches::kFileManagerExtensionPath)); 280 command_line->GetSwitchValuePath(switches::kFileManagerExtensionPath));
281 Add(IDR_FILEMANAGER_MANIFEST, filemgr_extension_path); 281 Add(IDR_FILEMANAGER_MANIFEST, filemgr_extension_path);
282 return; 282 return;
283 } 283 }
284 #endif // NDEBUG 284 #endif // NDEBUG
285 Add(IDR_FILEMANAGER_MANIFEST, 285 Add(IDR_FILEMANAGER_MANIFEST,
286 base::FilePath(FILE_PATH_LITERAL("file_manager"))); 286 base::FilePath(FILE_PATH_LITERAL("file_manager")));
287 #endif // defined(FILE_MANAGER_EXTENSION) 287 #endif // defined(OS_CHROMEOS)
288 } 288 }
289 289
290 void ComponentLoader::AddHangoutServicesExtension() { 290 void ComponentLoader::AddHangoutServicesExtension() {
291 #if defined(GOOGLE_CHROME_BUILD) 291 #if defined(GOOGLE_CHROME_BUILD)
292 Add(IDR_HANGOUT_SERVICES_MANIFEST, 292 Add(IDR_HANGOUT_SERVICES_MANIFEST,
293 base::FilePath(FILE_PATH_LITERAL("hangout_services"))); 293 base::FilePath(FILE_PATH_LITERAL("hangout_services")));
294 #endif 294 #endif
295 } 295 }
296 296
297 void ComponentLoader::AddImageLoaderExtension() { 297 void ComponentLoader::AddImageLoaderExtension() {
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
602 602
603 void ComponentLoader::UnloadComponent(ComponentExtensionInfo* component) { 603 void ComponentLoader::UnloadComponent(ComponentExtensionInfo* component) {
604 delete component->manifest; 604 delete component->manifest;
605 if (extension_service_->is_ready()) { 605 if (extension_service_->is_ready()) {
606 extension_service_-> 606 extension_service_->
607 RemoveComponentExtension(component->extension_id); 607 RemoveComponentExtension(component->extension_id);
608 } 608 }
609 } 609 }
610 610
611 } // namespace extensions 611 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698