1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CHROME_COMMON_IMPORTER_IMPORTER_DATA_TYPES_H_
6 #define CHROME_COMMON_IMPORTER_IMPORTER_DATA_TYPES_H_
11 #include "base/basictypes.h"
12 #include "base/files/file_path.h"
13 #include "base/memory/ref_counted.h"
14 #include "base/strings/string16.h"
15 #include "base/time/time.h"
16 #include "chrome/common/importer/importer_type.h"
19 // Types needed for importing data from other browsers and the Google Toolbar.
22 // An enumeration of the type of data that can be imported.
27 COOKIES = 1 << 2, // Not supported yet.
29 SEARCH_ENGINES = 1 << 4,
31 ALL = (1 << 6) - 1 // All the bits should be 1, hence the -1.
34 // Information about a profile needed by an importer to do import work.
35 struct SourceProfile {
39 string16 importer_name;
40 ImporterType importer_type;
41 base::FilePath source_path;
42 base::FilePath app_path;
43 uint16 services_supported; // Bitmask of ImportItem.
44 // The application locale. Stored because we can only access it from the UI
45 // thread on the browser process. This is only used by the Firefox importer.
49 // Contains information needed for importing bookmarks/search engine urls, etc.
50 struct URLKeywordInfo {
53 string16 display_name;
57 // Contains the information read from the IE7/IE8 Storage2 key in the registry.
58 struct ImporterIE7PasswordInfo {
60 std::wstring url_hash;
62 // Encrypted data containing the username, password and some more
63 // undocumented fields.
64 std::vector<unsigned char> encrypted_data;
66 // When the login was imported.
67 base::Time date_created;
71 // Mapped to history::VisitSource after import in the browser.
73 VISIT_SOURCE_BROWSED = 0,
74 VISIT_SOURCE_FIREFOX_IMPORTED = 1,
75 VISIT_SOURCE_IE_IMPORTED = 2,
76 VISIT_SOURCE_SAFARI_IMPORTED = 3,
79 } // namespace importer
81 #endif // CHROME_COMMON_IMPORTER_IMPORTER_DATA_TYPES_H_