OLD | NEW |
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 #include "chrome/browser/bookmarks/bookmark_html_writer.h" | 5 #include "chrome/browser/bookmarks/bookmark_html_writer.h" |
6 | 6 |
7 #include "base/base64.h" | 7 #include "base/base64.h" |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/bind_helpers.h" | 9 #include "base/bind_helpers.h" |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
12 #include "base/message_loop.h" | 12 #include "base/message_loop.h" |
13 #include "base/platform_file.h" | 13 #include "base/platform_file.h" |
14 #include "base/strings/string_number_conversions.h" | 14 #include "base/strings/string_number_conversions.h" |
15 #include "base/time/time.h" | 15 #include "base/time/time.h" |
16 #include "base/values.h" | 16 #include "base/values.h" |
17 #include "chrome/browser/bookmarks/bookmark_codec.h" | 17 #include "chrome/browser/bookmarks/bookmark_codec.h" |
18 #include "chrome/browser/bookmarks/bookmark_model.h" | 18 #include "chrome/browser/bookmarks/bookmark_model.h" |
19 #include "chrome/browser/bookmarks/bookmark_model_factory.h" | 19 #include "chrome/browser/bookmarks/bookmark_model_factory.h" |
| 20 #include "chrome/browser/chrome_notification_types.h" |
20 #include "chrome/browser/favicon/favicon_service.h" | 21 #include "chrome/browser/favicon/favicon_service.h" |
21 #include "chrome/browser/favicon/favicon_service_factory.h" | 22 #include "chrome/browser/favicon/favicon_service_factory.h" |
22 #include "chrome/browser/favicon/favicon_types.h" | 23 #include "chrome/browser/favicon/favicon_types.h" |
23 #include "chrome/common/chrome_notification_types.h" | |
24 #include "content/public/browser/browser_thread.h" | 24 #include "content/public/browser/browser_thread.h" |
25 #include "content/public/browser/notification_source.h" | 25 #include "content/public/browser/notification_source.h" |
26 #include "grit/generated_resources.h" | 26 #include "grit/generated_resources.h" |
27 #include "net/base/escape.h" | 27 #include "net/base/escape.h" |
28 #include "net/base/file_stream.h" | 28 #include "net/base/file_stream.h" |
29 #include "net/base/net_errors.h" | 29 #include "net/base/net_errors.h" |
30 #include "ui/base/l10n/l10n_util.h" | 30 #include "ui/base/l10n/l10n_util.h" |
31 #include "ui/gfx/favicon_size.h" | 31 #include "ui/gfx/favicon_size.h" |
32 | 32 |
33 using content::BrowserThread; | 33 using content::BrowserThread; |
(...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
502 // BookmarkModel isn't thread safe (nor would we want to lock it down | 502 // BookmarkModel isn't thread safe (nor would we want to lock it down |
503 // for the duration of the write), as such we make a copy of the | 503 // for the duration of the write), as such we make a copy of the |
504 // BookmarkModel using BookmarkCodec then write from that. | 504 // BookmarkModel using BookmarkCodec then write from that. |
505 if (fetcher == NULL) { | 505 if (fetcher == NULL) { |
506 fetcher = new BookmarkFaviconFetcher(profile, path, observer); | 506 fetcher = new BookmarkFaviconFetcher(profile, path, observer); |
507 fetcher->ExportBookmarks(); | 507 fetcher->ExportBookmarks(); |
508 } | 508 } |
509 } | 509 } |
510 | 510 |
511 } // namespace bookmark_html_writer | 511 } // namespace bookmark_html_writer |
OLD | NEW |