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

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

Issue 18501013: Move most importer code to chrome/utility/importer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: another gyp attempt Created 7 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/bookmarks_file_importer.cc
diff --git a/chrome/browser/importer/bookmarks_file_importer.cc b/chrome/browser/importer/bookmarks_file_importer.cc
deleted file mode 100644
index 3a1c871befffe26f508d24ecb0aa5abe0c785b74..0000000000000000000000000000000000000000
--- a/chrome/browser/importer/bookmarks_file_importer.cc
+++ /dev/null
@@ -1,59 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/browser/importer/bookmarks_file_importer.h"
-
-#include "base/bind.h"
-#include "chrome/browser/importer/bookmark_html_reader.h"
-#include "chrome/browser/importer/firefox_importer_utils.h"
-#include "chrome/browser/importer/importer_bridge.h"
-#include "chrome/common/importer/imported_bookmark_entry.h"
-#include "chrome/common/importer/imported_favicon_usage.h"
-#include "chrome/common/importer/importer_data_types.h"
-#include "grit/generated_resources.h"
-
-namespace {
-
-bool IsImporterCancelled(BookmarksFileImporter* importer) {
- return importer->cancelled();
-}
-
-} // namespace
-
-BookmarksFileImporter::BookmarksFileImporter() {}
-
-BookmarksFileImporter::~BookmarksFileImporter() {}
-
-void BookmarksFileImporter::StartImport(
- const importer::SourceProfile& source_profile,
- uint16 items,
- ImporterBridge* bridge) {
- // The only thing this importer can import is a bookmarks file, aka
- // "favorites".
- DCHECK_EQ(importer::FAVORITES, items);
-
- bridge->NotifyStarted();
- bridge->NotifyItemStarted(importer::FAVORITES);
-
- std::vector<ImportedBookmarkEntry> bookmarks;
- std::vector<ImportedFaviconUsage> favicons;
-
- bookmark_html_reader::ImportBookmarksFile(
- base::Bind(IsImporterCancelled, base::Unretained(this)),
- base::Bind(CanImportURL),
- source_profile.source_path,
- &bookmarks,
- &favicons);
-
- if (!bookmarks.empty() && !cancelled()) {
- base::string16 first_folder_name =
- bridge->GetLocalizedString(IDS_BOOKMARK_GROUP);
- bridge->AddBookmarks(bookmarks, first_folder_name);
- }
- if (!favicons.empty())
- bridge->SetFavicons(favicons);
-
- bridge->NotifyItemEnded(importer::FAVORITES);
- bridge->NotifyEnded();
-}
« no previous file with comments | « chrome/browser/importer/bookmarks_file_importer.h ('k') | chrome/browser/importer/external_process_importer_bridge.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698