OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_BOOKMARKS_BOOKMARK_HTML_WRITER_H_ | 5 #ifndef CHROME_BROWSER_BOOKMARKS_BOOKMARK_HTML_WRITER_H_ |
6 #define CHROME_BROWSER_BOOKMARKS_BOOKMARK_HTML_WRITER_H_ | 6 #define CHROME_BROWSER_BOOKMARKS_BOOKMARK_HTML_WRITER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <list> | 9 #include <list> |
10 #include <map> | 10 #include <map> |
(...skipping 30 matching lines...) Expand all Loading... |
41 const FilePath& path, | 41 const FilePath& path, |
42 BookmarksExportObserver* observer); | 42 BookmarksExportObserver* observer); |
43 virtual ~BookmarkFaviconFetcher(); | 43 virtual ~BookmarkFaviconFetcher(); |
44 | 44 |
45 // Executes bookmark export process. | 45 // Executes bookmark export process. |
46 void ExportBookmarks(); | 46 void ExportBookmarks(); |
47 | 47 |
48 // content::NotificationObserver implementation. | 48 // content::NotificationObserver implementation. |
49 virtual void Observe(int type, | 49 virtual void Observe(int type, |
50 const content::NotificationSource& source, | 50 const content::NotificationSource& source, |
51 const content::NotificationDetails& details); | 51 const content::NotificationDetails& details) OVERRIDE; |
52 | 52 |
53 private: | 53 private: |
54 // Recursively extracts URLs from bookmarks. | 54 // Recursively extracts URLs from bookmarks. |
55 void ExtractUrls(const BookmarkNode* node); | 55 void ExtractUrls(const BookmarkNode* node); |
56 | 56 |
57 // Executes Writer task that writes bookmarks data to html file. | 57 // Executes Writer task that writes bookmarks data to html file. |
58 void ExecuteWriter(); | 58 void ExecuteWriter(); |
59 | 59 |
60 // Starts async fetch for the next bookmark favicon. | 60 // Starts async fetch for the next bookmark favicon. |
61 // Takes single url from bookmark_urls_ and removes it from the list. | 61 // Takes single url from bookmark_urls_ and removes it from the list. |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 // thread is used. | 97 // thread is used. |
98 // Before writing to the file favicons are fetched on the main thread. | 98 // Before writing to the file favicons are fetched on the main thread. |
99 // TODO(sky): need a callback on failure. | 99 // TODO(sky): need a callback on failure. |
100 void WriteBookmarks(Profile* profile, | 100 void WriteBookmarks(Profile* profile, |
101 const FilePath& path, | 101 const FilePath& path, |
102 BookmarksExportObserver* observer); | 102 BookmarksExportObserver* observer); |
103 | 103 |
104 } // namespace bookmark_html_writer | 104 } // namespace bookmark_html_writer |
105 | 105 |
106 #endif // CHROME_BROWSER_BOOKMARKS_BOOKMARK_HTML_WRITER_H_ | 106 #endif // CHROME_BROWSER_BOOKMARKS_BOOKMARK_HTML_WRITER_H_ |
OLD | NEW |