Chromium Code Reviews| 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/extension_service.h" | 5 #include "chrome/browser/extensions/extension_service.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <set> | 8 #include <set> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 1874 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1885 void ExtensionService::ReportExtensionLoadError( | 1885 void ExtensionService::ReportExtensionLoadError( |
| 1886 const FilePath& extension_path, | 1886 const FilePath& extension_path, |
| 1887 const std::string &error, | 1887 const std::string &error, |
| 1888 NotificationType type, | 1888 NotificationType type, |
| 1889 bool be_noisy) { | 1889 bool be_noisy) { |
| 1890 NotificationService* service = NotificationService::current(); | 1890 NotificationService* service = NotificationService::current(); |
| 1891 service->Notify(type, | 1891 service->Notify(type, |
| 1892 Source<Profile>(profile_), | 1892 Source<Profile>(profile_), |
| 1893 Details<const std::string>(&error)); | 1893 Details<const std::string>(&error)); |
| 1894 | 1894 |
| 1895 // TODO(port): note that this isn't guaranteed to work properly on Linux. | 1895 std::string path_str = UTF16ToUTF8(extension_path.LossyDisplayName()); |
|
Mark Mentovai
2011/02/01 22:42:44
16To8(LossyDisplayName) is frustrating.
I’m also
Mark Mentovai
2011/02/01 22:54:55
16To8(LossyDisplayName) is frustrating. On the Mac
| |
| 1896 std::string path_str = WideToUTF8(extension_path.ToWStringHack()); | |
| 1897 std::string message = base::StringPrintf( | 1896 std::string message = base::StringPrintf( |
| 1898 "Could not load extension from '%s'. %s", | 1897 "Could not load extension from '%s'. %s", |
| 1899 path_str.c_str(), error.c_str()); | 1898 path_str.c_str(), error.c_str()); |
| 1900 ExtensionErrorReporter::GetInstance()->ReportError(message, be_noisy); | 1899 ExtensionErrorReporter::GetInstance()->ReportError(message, be_noisy); |
| 1901 } | 1900 } |
| 1902 | 1901 |
| 1903 void ExtensionService::DidCreateRenderViewForBackgroundPage( | 1902 void ExtensionService::DidCreateRenderViewForBackgroundPage( |
| 1904 ExtensionHost* host) { | 1903 ExtensionHost* host) { |
| 1905 OrphanedDevTools::iterator iter = | 1904 OrphanedDevTools::iterator iter = |
| 1906 orphaned_dev_tools_.find(host->extension()->id()); | 1905 orphaned_dev_tools_.find(host->extension()->id()); |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1985 } | 1984 } |
| 1986 | 1985 |
| 1987 void ExtensionService::SetBeingUpgraded(const Extension* extension, | 1986 void ExtensionService::SetBeingUpgraded(const Extension* extension, |
| 1988 bool value) { | 1987 bool value) { |
| 1989 extension_runtime_data_[extension->id()].being_upgraded = value; | 1988 extension_runtime_data_[extension->id()].being_upgraded = value; |
| 1990 } | 1989 } |
| 1991 | 1990 |
| 1992 PropertyBag* ExtensionService::GetPropertyBag(const Extension* extension) { | 1991 PropertyBag* ExtensionService::GetPropertyBag(const Extension* extension) { |
| 1993 return &extension_runtime_data_[extension->id()].property_bag; | 1992 return &extension_runtime_data_[extension->id()].property_bag; |
| 1994 } | 1993 } |
| OLD | NEW |