OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/extensions_service.h" | 5 #include "chrome/browser/extensions/extensions_service.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
10 #include "base/values.h" | 10 #include "base/values.h" |
(...skipping 567 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
578 | 578 |
579 if (!extension) { | 579 if (!extension) { |
580 ReportExtensionLoadError(extension_path, error); | 580 ReportExtensionLoadError(extension_path, error); |
581 return; | 581 return; |
582 } | 582 } |
583 | 583 |
584 extension->set_location(Extension::LOAD); | 584 extension->set_location(Extension::LOAD); |
585 ReportExtensionLoaded(extension); | 585 ReportExtensionLoaded(extension); |
586 } | 586 } |
587 | 587 |
| 588 |
588 void ExtensionsServiceBackend::ReportExtensionLoadError( | 589 void ExtensionsServiceBackend::ReportExtensionLoadError( |
589 const FilePath& extension_path, const std::string &error) { | 590 const FilePath& extension_path, const std::string &error) { |
590 ::ReportExtensionLoadError(extension_path, error, alert_on_error_); | 591 ::ReportExtensionLoadError(extension_path, error, alert_on_error_); |
591 } | 592 } |
592 | 593 |
593 void ExtensionsServiceBackend::ReportExtensionLoaded(Extension* extension) { | 594 void ExtensionsServiceBackend::ReportExtensionLoaded(Extension* extension) { |
594 frontend_loop_->PostTask(FROM_HERE, NewRunnableMethod( | 595 frontend_loop_->PostTask(FROM_HERE, NewRunnableMethod( |
595 frontend_, &ExtensionsService::OnExtensionLoaded, extension)); | 596 frontend_, &ExtensionsService::OnExtensionLoaded, extension)); |
596 } | 597 } |
597 | 598 |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
671 linked_ptr<ExternalExtensionProvider>(test_provider); | 672 linked_ptr<ExternalExtensionProvider>(test_provider); |
672 } | 673 } |
673 | 674 |
674 void ExtensionsServiceBackend::OnExternalExtensionFound( | 675 void ExtensionsServiceBackend::OnExternalExtensionFound( |
675 const std::string& id, const Version* version, const FilePath& path, | 676 const std::string& id, const Version* version, const FilePath& path, |
676 Extension::Location location) { | 677 Extension::Location location) { |
677 frontend_loop_->PostTask(FROM_HERE, NewRunnableMethod(frontend_, | 678 frontend_loop_->PostTask(FROM_HERE, NewRunnableMethod(frontend_, |
678 &ExtensionsService::OnExternalExtensionFound, id, version->GetString(), | 679 &ExtensionsService::OnExternalExtensionFound, id, version->GetString(), |
679 path, location)); | 680 path, location)); |
680 } | 681 } |
OLD | NEW |