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

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

Issue 6246036: FilePath: Remove most of ToWStringHack, adding a LossyDisplayName() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: retry Created 9 years, 10 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) 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 1875 matching lines...) Expand 10 before | Expand all | Expand 10 after
1886 void ExtensionService::ReportExtensionLoadError( 1886 void ExtensionService::ReportExtensionLoadError(
1887 const FilePath& extension_path, 1887 const FilePath& extension_path,
1888 const std::string &error, 1888 const std::string &error,
1889 NotificationType type, 1889 NotificationType type,
1890 bool be_noisy) { 1890 bool be_noisy) {
1891 NotificationService* service = NotificationService::current(); 1891 NotificationService* service = NotificationService::current();
1892 service->Notify(type, 1892 service->Notify(type,
1893 Source<Profile>(profile_), 1893 Source<Profile>(profile_),
1894 Details<const std::string>(&error)); 1894 Details<const std::string>(&error));
1895 1895
1896 // TODO(port): note that this isn't guaranteed to work properly on Linux. 1896 std::string path_str = UTF16ToUTF8(extension_path.LossyDisplayName());
Mark Mentovai 2011/02/04 19:26:58 :( Still controversial?
evanm 2011/02/04 19:37:12 This code is all weird ("wrong"). We have a user-
Avi (use Gerrit) 2011/02/04 19:42:32 I see no filed bug nor reference to it.
evanm 2011/02/04 19:58:50 I filed 71980. Are you saying you want me to tag
1897 std::string path_str = WideToUTF8(extension_path.ToWStringHack());
1898 std::string message = base::StringPrintf( 1897 std::string message = base::StringPrintf(
1899 "Could not load extension from '%s'. %s", 1898 "Could not load extension from '%s'. %s",
1900 path_str.c_str(), error.c_str()); 1899 path_str.c_str(), error.c_str());
1901 ExtensionErrorReporter::GetInstance()->ReportError(message, be_noisy); 1900 ExtensionErrorReporter::GetInstance()->ReportError(message, be_noisy);
1902 } 1901 }
1903 1902
1904 void ExtensionService::DidCreateRenderViewForBackgroundPage( 1903 void ExtensionService::DidCreateRenderViewForBackgroundPage(
1905 ExtensionHost* host) { 1904 ExtensionHost* host) {
1906 OrphanedDevTools::iterator iter = 1905 OrphanedDevTools::iterator iter =
1907 orphaned_dev_tools_.find(host->extension()->id()); 1906 orphaned_dev_tools_.find(host->extension()->id());
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
1986 } 1985 }
1987 1986
1988 void ExtensionService::SetBeingUpgraded(const Extension* extension, 1987 void ExtensionService::SetBeingUpgraded(const Extension* extension,
1989 bool value) { 1988 bool value) {
1990 extension_runtime_data_[extension->id()].being_upgraded = value; 1989 extension_runtime_data_[extension->id()].being_upgraded = value;
1991 } 1990 }
1992 1991
1993 PropertyBag* ExtensionService::GetPropertyBag(const Extension* extension) { 1992 PropertyBag* ExtensionService::GetPropertyBag(const Extension* extension) {
1994 return &extension_runtime_data_[extension->id()].property_bag; 1993 return &extension_runtime_data_[extension->id()].property_bag;
1995 } 1994 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698