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

Unified Diff: chrome/browser/importer/importer_list.cc

Issue 10830098: Get the Firefox branding name dynamically (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 8 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/importer/importer_list.cc
===================================================================
--- chrome/browser/importer/importer_list.cc (revision 148898)
+++ chrome/browser/importer/importer_list.cc (working copy)
@@ -75,12 +75,21 @@
} else if (version >= 3) {
firefox_type = importer::TYPE_FIREFOX3;
} else {
- // Ignores other versions of firefox.
+ LOG(WARNING) << "Importing from Firefox version " << version
+ << " is not supported.";
Ilya Sherman 2012/08/03 23:12:29 Please revert this change. Chrome generally only
cristian.patrasciuc 2012/08/07 15:46:49 Done.
return;
}
importer::SourceProfile* firefox = new importer::SourceProfile;
- firefox->importer_name = l10n_util::GetStringUTF16(IDS_IMPORT_FROM_FIREFOX);
+ const std::string branding_name = GetFirefoxBrandingName(app_path);
Ilya Sherman 2012/08/03 23:12:29 I would suggestion moving the below if-else logic
cristian.patrasciuc 2012/08/06 15:12:39 This will make unit tests depend on l10n/generated
Ilya Sherman 2012/08/06 21:07:37 That's ok.
cristian.patrasciuc 2012/08/07 15:46:49 Done.
+ if (branding_name.find("Iceweasel") != std::string::npos ||
+ branding_name.find("iceweasel") != std::string::npos) {
+ firefox->importer_name =
+ l10n_util::GetStringUTF16(IDS_IMPORT_FROM_ICEWEASEL);
+ } else {
+ firefox->importer_name =
+ l10n_util::GetStringUTF16(IDS_IMPORT_FROM_FIREFOX);
+ }
firefox->importer_type = firefox_type;
firefox->source_path = profile_path;
#if defined(OS_WIN)

Powered by Google App Engine
This is Rietveld 408576698