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

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

Issue 31008: Coalesce more hardcoded schemes to using predefined constants. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/importer/firefox2_importer.cc ('k') | chrome/browser/net/url_fixer_upper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/importer/ie_importer.cc
===================================================================
--- chrome/browser/importer/ie_importer.cc (revision 10345)
+++ chrome/browser/importer/ie_importer.cc (working copy)
@@ -22,6 +22,7 @@
#include "chrome/browser/search_engines/template_url_model.h"
#include "chrome/common/l10n_util.h"
#include "chrome/common/time_format.h"
+#include "chrome/common/url_constants.h"
#include "chrome/common/win_util.h"
#include "googleurl/src/gurl.h"
#include "grit/generated_resources.h"
@@ -194,8 +195,8 @@
continue;
GURL url(ac_list[i].key.c_str());
- if (!(LowerCaseEqualsASCII(url.scheme(), "http") ||
- LowerCaseEqualsASCII(url.scheme(), "https"))) {
+ if (!(LowerCaseEqualsASCII(url.scheme(), chrome::kHttpScheme) ||
+ LowerCaseEqualsASCII(url.scheme(), chrome::kHttpsScheme))) {
continue;
}
@@ -272,7 +273,10 @@
// Reads history information from COM interface.
void IEImporter::ImportHistory() {
- const std::string kSchemes[] = {"http", "https", "ftp", "file"};
+ const std::string kSchemes[] = {chrome::kHttpScheme,
+ chrome::kHttpsScheme,
+ chrome::kFtpScheme,
+ chrome::kFileScheme};
int total_schemes = arraysize(kSchemes);
CComPtr<IUrlHistoryStg2> url_history_stg2;
« no previous file with comments | « chrome/browser/importer/firefox2_importer.cc ('k') | chrome/browser/net/url_fixer_upper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698