OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
8 #include "base/base64.h" | 8 #include "base/base64.h" |
9 #include "base/callback.h" | 9 #include "base/callback.h" |
10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
11 #include "base/message_loop.h" | 11 #include "base/message_loop.h" |
12 #include "base/platform_file.h" | 12 #include "base/platform_file.h" |
13 #include "base/scoped_ptr.h" | 13 #include "base/scoped_ptr.h" |
14 #include "base/string_number_conversions.h" | 14 #include "base/string_number_conversions.h" |
15 #include "base/time.h" | 15 #include "base/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/browser_thread.h" | 19 #include "chrome/browser/browser_thread.h" |
20 #include "chrome/browser/history/history_types.h" | 20 #include "chrome/browser/history/history_types.h" |
21 #include "chrome/browser/profile.h" | 21 #include "chrome/browser/profiles/profile.h" |
22 #include "chrome/common/notification_service.h" | 22 #include "chrome/common/notification_service.h" |
23 #include "chrome/common/notification_source.h" | 23 #include "chrome/common/notification_source.h" |
24 #include "grit/generated_resources.h" | 24 #include "grit/generated_resources.h" |
25 #include "net/base/escape.h" | 25 #include "net/base/escape.h" |
26 #include "net/base/file_stream.h" | 26 #include "net/base/file_stream.h" |
27 #include "net/base/net_errors.h" | 27 #include "net/base/net_errors.h" |
28 | 28 |
29 namespace { | 29 namespace { |
30 | 30 |
31 static BookmarkFaviconFetcher* fetcher = NULL; | 31 static BookmarkFaviconFetcher* fetcher = NULL; |
(...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
479 // BookmarkModel isn't thread safe (nor would we want to lock it down | 479 // BookmarkModel isn't thread safe (nor would we want to lock it down |
480 // for the duration of the write), as such we make a copy of the | 480 // for the duration of the write), as such we make a copy of the |
481 // BookmarkModel using BookmarkCodec then write from that. | 481 // BookmarkModel using BookmarkCodec then write from that. |
482 if (fetcher == NULL) { | 482 if (fetcher == NULL) { |
483 fetcher = new BookmarkFaviconFetcher(profile, path, observer); | 483 fetcher = new BookmarkFaviconFetcher(profile, path, observer); |
484 fetcher->ExportBookmarks(); | 484 fetcher->ExportBookmarks(); |
485 } | 485 } |
486 } | 486 } |
487 | 487 |
488 } // namespace bookmark_html_writer | 488 } // namespace bookmark_html_writer |
OLD | NEW |