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

Side by Side Diff: chrome/browser/bookmarks/bookmark_html_writer.h

Issue 137263007: Move CancelableTaskTracker to //base/task/CancelableTaskTracker. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move to base/task/cancelable_task_tracker* Created 6 years, 10 months 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
« no previous file with comments | « chrome/browser/android/shortcut_helper.cc ('k') | chrome/browser/bookmarks/bookmark_model.h » ('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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 7
8 #include <list> 8 #include <list>
9 #include <map> 9 #include <map>
10 #include <string> 10 #include <string>
11 11
12 #include "base/files/file_path.h" 12 #include "base/files/file_path.h"
13 #include "base/memory/ref_counted.h" 13 #include "base/memory/ref_counted.h"
14 #include "base/memory/ref_counted_memory.h" 14 #include "base/memory/ref_counted_memory.h"
15 #include "chrome/common/cancelable_task_tracker.h" 15 #include "base/task/cancelable_task_tracker.h"
16 #include "content/public/browser/notification_observer.h" 16 #include "content/public/browser/notification_observer.h"
17 #include "content/public/browser/notification_registrar.h" 17 #include "content/public/browser/notification_registrar.h"
18 18
19 class BookmarkNode; 19 class BookmarkNode;
20 class Profile; 20 class Profile;
21 21
22 namespace chrome { 22 namespace chrome {
23 struct FaviconBitmapResult; 23 struct FaviconBitmapResult;
24 } 24 }
25 25
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 void OnFaviconDataAvailable(const chrome::FaviconBitmapResult& bitmap_result); 72 void OnFaviconDataAvailable(const chrome::FaviconBitmapResult& bitmap_result);
73 73
74 // The Profile object used for accessing FaviconService, bookmarks model. 74 // The Profile object used for accessing FaviconService, bookmarks model.
75 Profile* profile_; 75 Profile* profile_;
76 76
77 // All URLs that are extracted from bookmarks. Used to fetch favicons 77 // All URLs that are extracted from bookmarks. Used to fetch favicons
78 // for each of them. After favicon is fetched top url is removed from list. 78 // for each of them. After favicon is fetched top url is removed from list.
79 std::list<std::string> bookmark_urls_; 79 std::list<std::string> bookmark_urls_;
80 80
81 // Tracks favicon tasks. 81 // Tracks favicon tasks.
82 CancelableTaskTracker cancelable_task_tracker_; 82 base::CancelableTaskTracker cancelable_task_tracker_;
83 83
84 // Map that stores favicon per URL. 84 // Map that stores favicon per URL.
85 scoped_ptr<URLFaviconMap> favicons_map_; 85 scoped_ptr<URLFaviconMap> favicons_map_;
86 86
87 // Path where html output is stored. 87 // Path where html output is stored.
88 base::FilePath path_; 88 base::FilePath path_;
89 89
90 BookmarksExportObserver* observer_; 90 BookmarksExportObserver* observer_;
91 91
92 content::NotificationRegistrar registrar_; 92 content::NotificationRegistrar registrar_;
93 93
94 DISALLOW_COPY_AND_ASSIGN(BookmarkFaviconFetcher); 94 DISALLOW_COPY_AND_ASSIGN(BookmarkFaviconFetcher);
95 }; 95 };
96 96
97 namespace bookmark_html_writer { 97 namespace bookmark_html_writer {
98 98
99 // Writes the bookmarks out in the 'bookmarks.html' format understood by 99 // Writes the bookmarks out in the 'bookmarks.html' format understood by
100 // Firefox and IE. The results are written to the file at |path|. The file 100 // Firefox and IE. The results are written to the file at |path|. The file
101 // thread is used. 101 // thread is used.
102 // Before writing to the file favicons are fetched on the main thread. 102 // Before writing to the file favicons are fetched on the main thread.
103 // TODO(sky): need a callback on failure. 103 // TODO(sky): need a callback on failure.
104 void WriteBookmarks(Profile* profile, 104 void WriteBookmarks(Profile* profile,
105 const base::FilePath& path, 105 const base::FilePath& path,
106 BookmarksExportObserver* observer); 106 BookmarksExportObserver* observer);
107 107
108 } // namespace bookmark_html_writer 108 } // namespace bookmark_html_writer
109 109
110 #endif // CHROME_BROWSER_BOOKMARKS_BOOKMARK_HTML_WRITER_H_ 110 #endif // CHROME_BROWSER_BOOKMARKS_BOOKMARK_HTML_WRITER_H_
OLDNEW
« no previous file with comments | « chrome/browser/android/shortcut_helper.cc ('k') | chrome/browser/bookmarks/bookmark_model.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698