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

Side by Side Diff: chrome/browser/importer/firefox2_importer.h

Issue 9471: Adds import/export of bookmarks to bookmarks.html file.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/browser.vcproj ('k') | chrome/browser/importer/firefox2_importer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_IMPORTER_FIREFOX2_IMPORTER_H_ 5 #ifndef CHROME_BROWSER_IMPORTER_FIREFOX2_IMPORTER_H_
6 #define CHROME_BROWSER_IMPORTER_FIREFOX2_IMPORTER_H_ 6 #define CHROME_BROWSER_IMPORTER_FIREFOX2_IMPORTER_H_
7 7
8 #include "chrome/browser/importer/importer.h" 8 #include "chrome/browser/importer/importer.h"
9 9
10 class TemplateURL; 10 class TemplateURL;
(...skipping 15 matching lines...) Expand all
26 // and stores their locations in |urls|. 26 // and stores their locations in |urls|.
27 static void LoadDefaultBookmarks(const std::wstring& firefox_app_path, 27 static void LoadDefaultBookmarks(const std::wstring& firefox_app_path,
28 std::set<GURL> *urls); 28 std::set<GURL> *urls);
29 29
30 // Creates a TemplateURL with the |keyword| and |url|. |title| may be empty. 30 // Creates a TemplateURL with the |keyword| and |url|. |title| may be empty.
31 // This function transfers ownership of the created TemplateURL to the caller. 31 // This function transfers ownership of the created TemplateURL to the caller.
32 static TemplateURL* CreateTemplateURL(const std::wstring& title, 32 static TemplateURL* CreateTemplateURL(const std::wstring& title,
33 const std::wstring& keyword, 33 const std::wstring& keyword,
34 const GURL& url); 34 const GURL& url);
35 35
36 // Imports the bookmarks from the specified file. |template_urls| and
37 // |favicons| may be null, in which case TemplateURLs and favicons are
38 // not parsed. Any bookmarks in |default_urls| are ignored.
39 static void ImportBookmarksFile(
40 const std::wstring& file_path,
41 const std::set<GURL>& default_urls,
42 bool first_run,
43 const std::wstring& first_folder_name,
44 Importer* importer,
45 std::vector<ProfileWriter::BookmarkEntry>* bookmarks,
46 std::vector<TemplateURL*>* template_urls,
47 std::vector<history::ImportedFavIconUsage>* favicons);
48
36 private: 49 private:
37 FRIEND_TEST(FirefoxImporterTest, Firefox2BookmarkParse); 50 FRIEND_TEST(FirefoxImporterTest, Firefox2BookmarkParse);
38 FRIEND_TEST(FirefoxImporterTest, Firefox2CookesParse); 51 FRIEND_TEST(FirefoxImporterTest, Firefox2CookesParse);
39 52
40 void ImportBookmarks(); 53 void ImportBookmarks();
41 void ImportPasswords(); 54 void ImportPasswords();
42 void ImportHistory(); 55 void ImportHistory();
43 void ImportSearchEngines(); 56 void ImportSearchEngines();
44 // Import the user's home page, unless it is set to default home page as 57 // Import the user's home page, unless it is set to default home page as
45 // defined in browserconfig.properties. 58 // defined in browserconfig.properties.
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 // to the given favicon usage vector. Will do nothing if the favicon is not 111 // to the given favicon usage vector. Will do nothing if the favicon is not
99 // valid. 112 // valid.
100 static void DataURLToFaviconUsage( 113 static void DataURLToFaviconUsage(
101 const GURL& link_url, 114 const GURL& link_url,
102 const GURL& favicon_data, 115 const GURL& favicon_data,
103 std::vector<history::ImportedFavIconUsage>* favicons); 116 std::vector<history::ImportedFavIconUsage>* favicons);
104 117
105 ProfileWriter* writer_; 118 ProfileWriter* writer_;
106 std::wstring source_path_; 119 std::wstring source_path_;
107 std::wstring app_path_; 120 std::wstring app_path_;
121 // If true, we only parse the bookmarks.html file specified as source_path_.
122 bool parsing_bookmarks_html_file_;
108 123
109 DISALLOW_EVIL_CONSTRUCTORS(Firefox2Importer); 124 DISALLOW_EVIL_CONSTRUCTORS(Firefox2Importer);
110 }; 125 };
111 126
112 #endif // CHROME_BROWSER_IMPORTER_FIREFOX2_IMPORTER_H_ 127 #endif // CHROME_BROWSER_IMPORTER_FIREFOX2_IMPORTER_H_
113
OLDNEW
« no previous file with comments | « chrome/browser/browser.vcproj ('k') | chrome/browser/importer/firefox2_importer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698