| 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> |
| 11 #include <string> | 11 #include <string> |
| 12 | 12 |
| 13 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
| 14 #include "chrome/browser/history/history.h" | 14 #include "chrome/browser/history/history.h" |
| 15 #include "content/public/browser/notification_registrar.h" | 15 #include "content/public/browser/notification_registrar.h" |
| 16 #include "net/base/file_stream.h" | 16 #include "net/base/file_stream.h" |
| 17 | 17 |
| 18 class BookmarkNode; | 18 class BookmarkNode; |
| 19 class FilePath; | 19 class FilePath; |
| 20 class GURL; | |
| 21 class Profile; | 20 class Profile; |
| 22 | 21 |
| 23 // Observer for bookmark html output. Used only in tests. | 22 // Observer for bookmark html output. Used only in tests. |
| 24 class BookmarksExportObserver { | 23 class BookmarksExportObserver { |
| 25 public: | 24 public: |
| 26 // Is invoked on the IO thread. | 25 // Is invoked on the IO thread. |
| 27 virtual void OnExportFinished() = 0; | 26 virtual void OnExportFinished() = 0; |
| 28 | 27 |
| 29 protected: | 28 protected: |
| 30 virtual ~BookmarksExportObserver() {} | 29 virtual ~BookmarksExportObserver() {} |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 // thread is used. | 97 // thread is used. |
| 99 // 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. |
| 100 // TODO(sky): need a callback on failure. | 99 // TODO(sky): need a callback on failure. |
| 101 void WriteBookmarks(Profile* profile, | 100 void WriteBookmarks(Profile* profile, |
| 102 const FilePath& path, | 101 const FilePath& path, |
| 103 BookmarksExportObserver* observer); | 102 BookmarksExportObserver* observer); |
| 104 | 103 |
| 105 } // namespace bookmark_html_writer | 104 } // namespace bookmark_html_writer |
| 106 | 105 |
| 107 #endif // CHROME_BROWSER_BOOKMARKS_BOOKMARK_HTML_WRITER_H_ | 106 #endif // CHROME_BROWSER_BOOKMARKS_BOOKMARK_HTML_WRITER_H_ |
| OLD | NEW |