summaryrefslogtreecommitdiffstats
path: root/chrome/common/importer
diff options
context:
space:
mode:
authortfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-27 19:20:18 +0000
committertfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-27 19:20:18 +0000
commit4f3b44679a442a13d949ca2deea1bc15612e8db0 (patch)
tree467728ace4aace084d1da233b7023b9e28487032 /chrome/common/importer
parentc7007d8241c86117f650361929c6887fd57522c4 (diff)
downloadchromium_src-4f3b44679a442a13d949ca2deea1bc15612e8db0.zip
chromium_src-4f3b44679a442a13d949ca2deea1bc15612e8db0.tar.gz
chromium_src-4f3b44679a442a13d949ca2deea1bc15612e8db0.tar.bz2
importer: Allow chrome to import internal chrome pages (i.e, chrome:// and about: urls).
Bookmark Manager allow users to import and export bookmarks to a html file, while it allow the users to export bookmarks like about:blank, chrome://version, it doesn't allow to import such bookmarks. This patch changes that behavior allowing the "Import Bookmarks from HTML File" process to import bookmarks with schemes like about: and chrome://. BUG=223528 TEST=bookmark some internal chrome pages (ones that start with chrome://* or about:*). Export then to html file through Bookmark Manager. Now import that html file, all the entries should be imported correctly. TBR=dbeam@chromium.org, isherman@chromium.org, pkasting@chromium.org, thakis@chromium.org Review URL: https://codereview.chromium.org/19461003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@214052 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/importer')
-rw-r--r--chrome/common/importer/firefox_importer_utils.cc16
-rw-r--r--chrome/common/importer/firefox_importer_utils.h4
2 files changed, 0 insertions, 20 deletions
diff --git a/chrome/common/importer/firefox_importer_utils.cc b/chrome/common/importer/firefox_importer_utils.cc
index 5ec56d6..44d7dbc 100644
--- a/chrome/common/importer/firefox_importer_utils.cc
+++ b/chrome/common/importer/firefox_importer_utils.cc
@@ -128,22 +128,6 @@ bool GetFirefoxVersionAndPathFromProfile(const base::FilePath& profile_path,
return ret;
}
-bool CanImportURL(const GURL& url) {
- const char* kInvalidSchemes[] = {"wyciwyg", "place", "about", "chrome"};
-
- // The URL is not valid.
- if (!url.is_valid())
- return false;
-
- // Filter out the URLs with unsupported schemes.
- for (size_t i = 0; i < arraysize(kInvalidSchemes); ++i) {
- if (url.SchemeIs(kInvalidSchemes[i]))
- return false;
- }
-
- return true;
-}
-
bool ReadPrefFile(const base::FilePath& path, std::string* content) {
if (content == NULL)
return false;
diff --git a/chrome/common/importer/firefox_importer_utils.h b/chrome/common/importer/firefox_importer_utils.h
index 54c5a74..5dac529 100644
--- a/chrome/common/importer/firefox_importer_utils.h
+++ b/chrome/common/importer/firefox_importer_utils.h
@@ -72,10 +72,6 @@ base::FilePath GetProfilesINI();
// "Genenral.StartWithLastProfile" has the value "1".
void ParseProfileINI(const base::FilePath& file, base::DictionaryValue* root);
-// Returns true if we want to add the URL to the history. We filter out the URL
-// with a unsupported scheme.
-bool CanImportURL(const GURL& url);
-
// Returns the home page set in Firefox in a particular profile.
GURL GetHomepage(const base::FilePath& profile_path);