summaryrefslogtreecommitdiffstats
path: root/chrome/browser
diff options
context:
space:
mode:
authortfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-10 02:04:13 +0000
committertfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-10 02:04:13 +0000
commit9fbf4026900f3b3c403c143449705c79c4f4df05 (patch)
tree697eeb7414c9be791c01bfc1968200973f1be34d /chrome/browser
parent1d65a9df5b70b71d39156ae426327582883b0974 (diff)
downloadchromium_src-9fbf4026900f3b3c403c143449705c79c4f4df05.zip
chromium_src-9fbf4026900f3b3c403c143449705c79c4f4df05.tar.gz
chromium_src-9fbf4026900f3b3c403c143449705c79c4f4df05.tar.bz2
importer: Remove unneeded includes.
Some unrelated changes: - Change a typedef enum to just enum, as we are in C++, and that is not needed. - Remove an extra empty line. - Sort headers alphabetical. - Remove wrong/unused forward declarations. BUG=None TEST=None R=avi@chromium.org Review URL: http://codereview.chromium.org/6813069 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81049 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r--chrome/browser/history/history_types.h4
-rw-r--r--chrome/browser/importer/external_process_importer_bridge.h2
-rw-r--r--chrome/browser/importer/firefox2_importer.cc1
-rw-r--r--chrome/browser/importer/firefox_profile_lock_unittest.cc1
-rw-r--r--chrome/browser/importer/ie_importer.cc4
-rw-r--r--chrome/browser/importer/importer_list.h3
-rw-r--r--chrome/browser/importer/importer_unittest.cc1
-rw-r--r--chrome/browser/importer/mork_reader.cc1
-rw-r--r--chrome/browser/importer/mork_reader.h12
-rw-r--r--chrome/browser/importer/nss_decryptor.cc1
-rw-r--r--chrome/browser/importer/profile_writer.h24
11 files changed, 21 insertions, 33 deletions
diff --git a/chrome/browser/history/history_types.h b/chrome/browser/history/history_types.h
index d643ea9..ac008e5 100644
--- a/chrome/browser/history/history_types.h
+++ b/chrome/browser/history/history_types.h
@@ -167,14 +167,14 @@ class URLRow {
// Different from page transition types, they describe the origins of visits.
// (Warning): Please don't change any existing values while it is ok to add
// new values when needed.
-typedef enum {
+enum VisitSource {
SOURCE_SYNCED = 0, // Synchronized from somewhere else.
SOURCE_BROWSED = 1, // User browsed.
SOURCE_EXTENSION = 2, // Added by an externsion.
SOURCE_FIREFOX_IMPORTED = 3,
SOURCE_IE_IMPORTED = 4,
SOURCE_SAFARI_IMPORTED = 5,
-} VisitSource;
+};
typedef int64 VisitID;
// Structure to hold the mapping between each visit's id and its source.
diff --git a/chrome/browser/importer/external_process_importer_bridge.h b/chrome/browser/importer/external_process_importer_bridge.h
index e2640b0..0773810 100644
--- a/chrome/browser/importer/external_process_importer_bridge.h
+++ b/chrome/browser/importer/external_process_importer_bridge.h
@@ -6,13 +6,11 @@
#define CHROME_BROWSER_IMPORTER_EXTERNAL_PROCESS_IMPORTER_BRIDGE_H_
#pragma once
-#include <string>
#include <vector>
#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "base/memory/scoped_ptr.h"
-#include "build/build_config.h"
#include "chrome/browser/importer/importer_bridge.h"
#include "chrome/browser/importer/profile_writer.h"
diff --git a/chrome/browser/importer/firefox2_importer.cc b/chrome/browser/importer/firefox2_importer.cc
index 8866f4d..f0dbcfd 100644
--- a/chrome/browser/importer/firefox2_importer.cc
+++ b/chrome/browser/importer/firefox2_importer.cc
@@ -17,7 +17,6 @@
#include "base/string_split.h"
#include "base/string_util.h"
#include "base/utf_string_conversions.h"
-#include "base/values.h"
#include "chrome/browser/history/history_types.h"
#include "chrome/browser/importer/firefox_importer_utils.h"
#include "chrome/browser/importer/importer_bridge.h"
diff --git a/chrome/browser/importer/firefox_profile_lock_unittest.cc b/chrome/browser/importer/firefox_profile_lock_unittest.cc
index a2c5e3f..bd3e1ec 100644
--- a/chrome/browser/importer/firefox_profile_lock_unittest.cc
+++ b/chrome/browser/importer/firefox_profile_lock_unittest.cc
@@ -2,7 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-
#include "base/file_util.h"
#include "base/path_service.h"
#include "base/process_util.h"
diff --git a/chrome/browser/importer/ie_importer.cc b/chrome/browser/importer/ie_importer.cc
index 732193a..d8843b6 100644
--- a/chrome/browser/importer/ie_importer.cc
+++ b/chrome/browser/importer/ie_importer.cc
@@ -19,16 +19,14 @@
#include "app/win/scoped_com_initializer.h"
#include "base/file_path.h"
#include "base/file_util.h"
-#include "base/win/scoped_comptr.h"
#include "base/string_split.h"
#include "base/string_util.h"
#include "base/time.h"
#include "base/utf_string_conversions.h"
-#include "base/values.h"
#include "base/win/registry.h"
+#include "base/win/scoped_comptr.h"
#include "base/win/scoped_handle.h"
#include "base/win/windows_version.h"
-#include "chrome/browser/bookmarks/bookmark_model.h"
#include "chrome/browser/importer/importer_bridge.h"
#include "chrome/browser/importer/importer_data_types.h"
#include "chrome/browser/password_manager/ie7_password.h"
diff --git a/chrome/browser/importer/importer_list.h b/chrome/browser/importer/importer_list.h
index c1b61fd..adb60ac 100644
--- a/chrome/browser/importer/importer_list.h
+++ b/chrome/browser/importer/importer_list.h
@@ -9,10 +9,9 @@
#include <vector>
#include "base/basictypes.h"
-#include "base/string16.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_vector.h"
-#include "build/build_config.h"
+#include "base/string16.h"
#include "content/browser/browser_thread.h"
namespace importer {
diff --git a/chrome/browser/importer/importer_unittest.cc b/chrome/browser/importer/importer_unittest.cc
index 9fe3e12..becc373 100644
--- a/chrome/browser/importer/importer_unittest.cc
+++ b/chrome/browser/importer/importer_unittest.cc
@@ -24,7 +24,6 @@
#include "base/stl_util-inl.h"
#include "base/string_util.h"
#include "base/utf_string_conversions.h"
-#include "base/values.h"
#include "chrome/browser/history/history_types.h"
#include "chrome/browser/importer/importer_bridge.h"
#include "chrome/browser/importer/importer_data_types.h"
diff --git a/chrome/browser/importer/mork_reader.cc b/chrome/browser/importer/mork_reader.cc
index 297cf3d..035a7056 100644
--- a/chrome/browser/importer/mork_reader.cc
+++ b/chrome/browser/importer/mork_reader.cc
@@ -50,7 +50,6 @@
#include "base/message_loop.h"
#include "base/string_number_conversions.h"
#include "base/string_util.h"
-#include "base/values.h"
#include "chrome/browser/history/history_types.h"
#include "chrome/browser/importer/firefox_importer_utils.h"
#include "chrome/browser/importer/importer_bridge.h"
diff --git a/chrome/browser/importer/mork_reader.h b/chrome/browser/importer/mork_reader.h
index 219dd03..7bc8f82 100644
--- a/chrome/browser/importer/mork_reader.h
+++ b/chrome/browser/importer/mork_reader.h
@@ -39,11 +39,10 @@
// Source:
// http://mxr.mozilla.org/firefox/source/db/morkreader/nsMorkReader.h
-#ifndef CHROME_BROWSER_IMPORTER_MORK_READER_H__
-#define CHROME_BROWSER_IMPORTER_MORK_READER_H__
+#ifndef CHROME_BROWSER_IMPORTER_MORK_READER_H_
+#define CHROME_BROWSER_IMPORTER_MORK_READER_H_
#pragma once
-#include <iosfwd>
#include <fstream>
#include <map>
#include <string>
@@ -53,18 +52,15 @@
class FilePath;
class ImporterBridge;
-class MessageLoop;
-class ProfileWriter;
// The nsMorkReader object allows a consumer to read in a mork-format
// file and enumerate the rows that it contains. It does not provide
// any functionality for modifying mork tables.
-
+//
// References:
// http://www.mozilla.org/mailnews/arch/mork/primer.txt
// http://www.mozilla.org/mailnews/arch/mork/grammar.txt
// http://www.jwz.org/hacks/mork.pl
-
class MorkReader {
public:
// The IDString type has built-in storage for the hex string representation
@@ -165,4 +161,4 @@ class MorkReader {
// ImportHistoryFromFirefox2 is the main entry point to the importer.
void ImportHistoryFromFirefox2(const FilePath& file, ImporterBridge* bridge);
-#endif // CHROME_BROWSER_IMPORTER_MORK_READER_H__
+#endif // CHROME_BROWSER_IMPORTER_MORK_READER_H_
diff --git a/chrome/browser/importer/nss_decryptor.cc b/chrome/browser/importer/nss_decryptor.cc
index efc3807..277e0a4 100644
--- a/chrome/browser/importer/nss_decryptor.cc
+++ b/chrome/browser/importer/nss_decryptor.cc
@@ -14,7 +14,6 @@
#include "base/string_split.h"
#include "base/string_util.h"
#include "base/utf_string_conversions.h"
-#include "build/build_config.h"
#include "webkit/glue/password_form.h"
#if defined(USE_NSS)
diff --git a/chrome/browser/importer/profile_writer.h b/chrome/browser/importer/profile_writer.h
index 79db950..c97d807 100644
--- a/chrome/browser/importer/profile_writer.h
+++ b/chrome/browser/importer/profile_writer.h
@@ -6,30 +6,27 @@
#define CHROME_BROWSER_IMPORTER_PROFILE_WRITER_H_
#pragma once
-#include <string>
#include <vector>
#include "base/basictypes.h"
#include "base/memory/ref_counted.h"
#include "base/time.h"
-#include "chrome/browser/bookmarks/bookmark_model_observer.h"
+#include "build/build_config.h"
#include "chrome/browser/history/history_types.h"
#include "googleurl/src/gurl.h"
+class BookmarkModel;
class Profile;
class TemplateURL;
-struct IE7PasswordInfo;
-
-namespace history {
-struct ImportedFaviconUsage;
-class URLRow;
-}
-
namespace webkit_glue {
struct PasswordForm;
}
+#if defined(OS_WIN)
+struct IE7PasswordInfo;
+#endif
+
// ProfileWriter encapsulates profile for writing entries into it.
// This object must be invoked on UI thread.
class ProfileWriter : public base::RefCountedThreadSafe<ProfileWriter> {
@@ -71,12 +68,16 @@ class ProfileWriter : public base::RefCountedThreadSafe<ProfileWriter> {
// Helper methods for adding data to local stores.
virtual void AddPasswordForm(const webkit_glue::PasswordForm& form);
+
#if defined(OS_WIN)
virtual void AddIE7PasswordInfo(const IE7PasswordInfo& info);
#endif
+
virtual void AddHistoryPage(const std::vector<history::URLRow>& page,
history::VisitSource visit_source);
+
virtual void AddHomepage(const GURL& homepage);
+
// Adds the bookmarks to the BookmarkModel.
// |options| is a bitmask of BookmarkOptions and dictates how and
// which bookmarks are added. If the bitmask contains IMPORT_TO_BOOKMARK_BAR,
@@ -92,8 +93,10 @@ class ProfileWriter : public base::RefCountedThreadSafe<ProfileWriter> {
virtual void AddBookmarkEntry(const std::vector<BookmarkEntry>& bookmark,
const string16& first_folder_name,
int options);
+
virtual void AddFavicons(
const std::vector<history::ImportedFaviconUsage>& favicons);
+
// Add the TemplateURLs in |template_urls| to the local store and make the
// TemplateURL at |default_keyword_index| the default keyword (does not set
// a default keyword if it is -1). The local store becomes the owner of the
@@ -104,6 +107,7 @@ class ProfileWriter : public base::RefCountedThreadSafe<ProfileWriter> {
// If unique_on_host_and_path a TemplateURL is only added if there is not an
// existing TemplateURL that has a replaceable search url with the same
// host+path combination.
+
virtual void AddKeywords(const std::vector<TemplateURL*>& template_urls,
int default_keyword_index,
bool unique_on_host_and_path);
@@ -111,8 +115,6 @@ class ProfileWriter : public base::RefCountedThreadSafe<ProfileWriter> {
// Shows the bookmarks toolbar.
void ShowBookmarkBar();
- Profile* profile() const { return profile_; }
-
protected:
friend class base::RefCountedThreadSafe<ProfileWriter>;