| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "components/enhanced_bookmarks/bookmark_image_service.h" | 5 #include "components/enhanced_bookmarks/bookmark_image_service.h" |
| 6 | 6 |
| 7 #include "base/single_thread_task_runner.h" | 7 #include "base/single_thread_task_runner.h" |
| 8 #include "base/task_runner_util.h" | 8 #include "base/task_runner_util.h" |
| 9 #include "base/thread_task_runner_handle.h" | 9 #include "base/thread_task_runner_handle.h" |
| 10 #include "base/threading/sequenced_worker_pool.h" | 10 #include "base/threading/sequenced_worker_pool.h" |
| 11 #include "components/bookmarks/browser/bookmark_model.h" | 11 #include "components/bookmarks/browser/bookmark_model.h" |
| 12 #include "components/bookmarks/browser/bookmark_model_observer.h" | 12 #include "components/bookmarks/browser/bookmark_model_observer.h" |
| 13 #include "components/enhanced_bookmarks/enhanced_bookmark_model.h" | 13 #include "components/enhanced_bookmarks/enhanced_bookmark_model.h" |
| 14 #include "components/enhanced_bookmarks/enhanced_bookmark_utils.h" | 14 #include "components/enhanced_bookmarks/enhanced_bookmark_utils.h" |
| 15 #include "components/enhanced_bookmarks/image_store_util.h" | 15 #include "components/enhanced_bookmarks/image_store_util.h" |
| 16 #include "components/enhanced_bookmarks/persistent_image_store.h" | 16 #include "components/enhanced_bookmarks/persistent_image_store.h" |
| 17 | 17 |
| 18 using bookmarks::BookmarkModel; | 18 using bookmarks::BookmarkModel; |
| 19 using bookmarks::BookmarkNode; |
| 19 | 20 |
| 20 namespace { | 21 namespace { |
| 21 | 22 |
| 22 const char kSequenceToken[] = "BookmarkImagesSequenceToken"; | 23 const char kSequenceToken[] = "BookmarkImagesSequenceToken"; |
| 23 | 24 |
| 24 void ConstructPersistentImageStore(PersistentImageStore* store, | 25 void ConstructPersistentImageStore(PersistentImageStore* store, |
| 25 const base::FilePath& path) { | 26 const base::FilePath& path) { |
| 26 DCHECK(store); | 27 DCHECK(store); |
| 27 new (store) PersistentImageStore(path); | 28 new (store) PersistentImageStore(path); |
| 28 } | 29 } |
| (...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 358 const BookmarkNode* node) { | 359 const BookmarkNode* node) { |
| 359 } | 360 } |
| 360 | 361 |
| 361 void BookmarkImageService::BookmarkAllUserNodesRemoved( | 362 void BookmarkImageService::BookmarkAllUserNodesRemoved( |
| 362 BookmarkModel* model, | 363 BookmarkModel* model, |
| 363 const std::set<GURL>& removed_urls) { | 364 const std::set<GURL>& removed_urls) { |
| 364 ClearAll(); | 365 ClearAll(); |
| 365 } | 366 } |
| 366 | 367 |
| 367 } // namespace enhanced_bookmarks | 368 } // namespace enhanced_bookmarks |
| OLD | NEW |