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

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

Issue 8890086: Issue 71980: Extensions code should use UTF-16 for user-visible Unicode strings (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 9 years 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 2279 matching lines...) Expand 10 before | Expand all | Expand 10 after
2290 void ExtensionService::ReportExtensionLoadError( 2290 void ExtensionService::ReportExtensionLoadError(
2291 const FilePath& extension_path, 2291 const FilePath& extension_path,
2292 const std::string &error, 2292 const std::string &error,
2293 bool be_noisy) { 2293 bool be_noisy) {
2294 content::NotificationService::current()->Notify( 2294 content::NotificationService::current()->Notify(
2295 chrome::NOTIFICATION_EXTENSION_LOAD_ERROR, 2295 chrome::NOTIFICATION_EXTENSION_LOAD_ERROR,
2296 content::Source<Profile>(profile_), 2296 content::Source<Profile>(profile_),
2297 content::Details<const std::string>(&error)); 2297 content::Details<const std::string>(&error));
2298 2298
2299 std::string path_str = UTF16ToUTF8(extension_path.LossyDisplayName()); 2299 std::string path_str = UTF16ToUTF8(extension_path.LossyDisplayName());
2300 std::string message = base::StringPrintf( 2300 string16 message = ASCIIToUTF16(base::StringPrintf(
2301 "Could not load extension from '%s'. %s", 2301 "Could not load extension from '%s'. %s",
2302 path_str.c_str(), error.c_str()); 2302 path_str.c_str(), error.c_str()));
2303 ExtensionErrorReporter::GetInstance()->ReportError(message, be_noisy); 2303 ExtensionErrorReporter::GetInstance()->ReportError(message, be_noisy);
2304 } 2304 }
2305 2305
2306 void ExtensionService::DidCreateRenderViewForBackgroundPage( 2306 void ExtensionService::DidCreateRenderViewForBackgroundPage(
2307 ExtensionHost* host) { 2307 ExtensionHost* host) {
2308 OrphanedDevTools::iterator iter = 2308 OrphanedDevTools::iterator iter =
2309 orphaned_dev_tools_.find(host->extension_id()); 2309 orphaned_dev_tools_.find(host->extension_id());
2310 if (iter == orphaned_dev_tools_.end()) 2310 if (iter == orphaned_dev_tools_.end())
2311 return; 2311 return;
2312 2312
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
2580 const ExtensionResource &resource, 2580 const ExtensionResource &resource,
2581 int index) { 2581 int index) {
2582 // If the image failed to load (e.g. if the resource being loaded was empty) 2582 // If the image failed to load (e.g. if the resource being loaded was empty)
2583 // use the standard application icon. 2583 // use the standard application icon.
2584 if (!image || image->isNull()) 2584 if (!image || image->isNull())
2585 image = ExtensionIconSource::LoadImageByResourceId(IDR_APP_DEFAULT_ICON); 2585 image = ExtensionIconSource::LoadImageByResourceId(IDR_APP_DEFAULT_ICON);
2586 2586
2587 shortcut_info_.favicon = *image; 2587 shortcut_info_.favicon = *image;
2588 web_app::CreateShortcut(profile_->GetPath(), shortcut_info_); 2588 web_app::CreateShortcut(profile_->GetPath(), shortcut_info_);
2589 } 2589 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698