summaryrefslogtreecommitdiffstats
path: root/chrome/browser/importer
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-26 01:56:02 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-26 01:56:02 +0000
commitdcf7d3525aa9b1f16b56a16d16108262db0571ee (patch)
tree91228f9d96aa74f102df742cdf76598cbb328958 /chrome/browser/importer
parent387b71b7d1d1bf267cbe088136610959b319f3b3 (diff)
downloadchromium_src-dcf7d3525aa9b1f16b56a16d16108262db0571ee.zip
chromium_src-dcf7d3525aa9b1f16b56a16d16108262db0571ee.tar.gz
chromium_src-dcf7d3525aa9b1f16b56a16d16108262db0571ee.tar.bz2
Coalesce more hardcoded schemes to using predefined constants.
Review URL: http://codereview.chromium.org/31008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10437 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/importer')
-rw-r--r--chrome/browser/importer/firefox2_importer.cc3
-rw-r--r--chrome/browser/importer/ie_importer.cc10
2 files changed, 9 insertions, 4 deletions
diff --git a/chrome/browser/importer/firefox2_importer.cc b/chrome/browser/importer/firefox2_importer.cc
index 2494bd1..77fd49f 100644
--- a/chrome/browser/importer/firefox2_importer.cc
+++ b/chrome/browser/importer/firefox2_importer.cc
@@ -15,6 +15,7 @@
#include "chrome/browser/search_engines/template_url_parser.h"
#include "chrome/common/l10n_util.h"
#include "chrome/common/time_format.h"
+#include "chrome/common/url_constants.h"
#include "grit/generated_resources.h"
#include "net/base/data_url.h"
@@ -527,7 +528,7 @@ void Firefox2Importer::DataURLToFaviconUsage(
const GURL& favicon_data,
std::vector<history::ImportedFavIconUsage>* favicons) {
if (!link_url.is_valid() || !favicon_data.is_valid() ||
- !favicon_data.SchemeIs("data"))
+ !favicon_data.SchemeIs(chrome::kDataScheme))
return;
// Parse the data URL.
diff --git a/chrome/browser/importer/ie_importer.cc b/chrome/browser/importer/ie_importer.cc
index 0d0e3e7..5d2dbff 100644
--- a/chrome/browser/importer/ie_importer.cc
+++ b/chrome/browser/importer/ie_importer.cc
@@ -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 @@ void IEImporter::ImportPasswordsIE6() {
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 @@ void IEImporter::ImportPasswordsIE7() {
// 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;