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 | |
589 void ExtensionsServiceBackend::ReportExtensionLoadError( | 588 void ExtensionsServiceBackend::ReportExtensionLoadError( |
590 const FilePath& extension_path, const std::string &error) { | 589 const FilePath& extension_path, const std::string &error) { |
591 ::ReportExtensionLoadError(extension_path, error, alert_on_error_); | 590 ::ReportExtensionLoadError(extension_path, error, alert_on_error_); |
592 } | 591 } |
593 | 592 |
594 void ExtensionsServiceBackend::ReportExtensionLoaded(Extension* extension) { | 593 void ExtensionsServiceBackend::ReportExtensionLoaded(Extension* extension) { |
595 frontend_loop_->PostTask(FROM_HERE, NewRunnableMethod( | 594 frontend_loop_->PostTask(FROM_HERE, NewRunnableMethod( |
596 frontend_, &ExtensionsService::OnExtensionLoaded, extension)); | 595 frontend_, &ExtensionsService::OnExtensionLoaded, extension)); |
597 } | 596 } |
598 | 597 |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
672 linked_ptr<ExternalExtensionProvider>(test_provider); | 671 linked_ptr<ExternalExtensionProvider>(test_provider); |
673 } | 672 } |
674 | 673 |
675 void ExtensionsServiceBackend::OnExternalExtensionFound( | 674 void ExtensionsServiceBackend::OnExternalExtensionFound( |
676 const std::string& id, const Version* version, const FilePath& path, | 675 const std::string& id, const Version* version, const FilePath& path, |
677 Extension::Location location) { | 676 Extension::Location location) { |
678 frontend_loop_->PostTask(FROM_HERE, NewRunnableMethod(frontend_, | 677 frontend_loop_->PostTask(FROM_HERE, NewRunnableMethod(frontend_, |
679 &ExtensionsService::OnExternalExtensionFound, id, version->GetString(), | 678 &ExtensionsService::OnExternalExtensionFound, id, version->GetString(), |
680 path, location)); | 679 path, location)); |
681 } | 680 } |
OLD | NEW |