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

Unified Diff: chrome/utility/importer/bookmark_html_reader.h

Issue 616763002: Importing certain bookmarks from firefox and HTML file as search engines. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed dependency issue. Created 5 years, 11 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/utility/importer/DEPS ('k') | chrome/utility/importer/bookmark_html_reader.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/utility/importer/bookmark_html_reader.h
diff --git a/chrome/utility/importer/bookmark_html_reader.h b/chrome/utility/importer/bookmark_html_reader.h
index 274c9a272169ee622e9b8f1c64d395e3764ab045..e3246341ecadc55fba139a14aca1dc49c0cb76fa 100644
--- a/chrome/utility/importer/bookmark_html_reader.h
+++ b/chrome/utility/importer/bookmark_html_reader.h
@@ -10,6 +10,7 @@
#include "base/callback_forward.h"
#include "base/strings/string16.h"
+#include "chrome/common/importer/importer_data_types.h"
class GURL;
struct ImportedBookmarkEntry;
@@ -37,6 +38,9 @@ namespace bookmark_html_reader {
// |bookmarks| is a pointer to a vector, which is filled with the imported
// bookmarks. It may not be NULL.
//
+// |search_engines| is a pointer to a vector, which is filled with the imported
+// search engines.
+//
// |favicons| is a pointer to a vector, which is filled with the favicons of
// imported bookmarks. It may be NULL, in which case favicons are not imported.
void ImportBookmarksFile(
@@ -44,8 +48,15 @@ void ImportBookmarksFile(
const base::Callback<bool(const GURL&)>& valid_url_callback,
const base::FilePath& file_path,
std::vector<ImportedBookmarkEntry>* bookmarks,
+ std::vector<importer::SearchEngineInfo>* search_engines,
std::vector<ImportedFaviconUsage>* favicons);
+// Returns true if |url| should be imported as a search engine, i.e. because it
+// has replacement terms. Chrome treats such bookmarks as search engines rather
+// than true bookmarks.
+bool CanImportURLAsSearchEngine(const GURL& url,
+ std::string* search_engine_url);
+
namespace internal {
// The file format that BookmarkHTMLReader parses starts with a heading
« no previous file with comments | « chrome/utility/importer/DEPS ('k') | chrome/utility/importer/bookmark_html_reader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698