OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "ios/chrome/browser/history/history_client_impl.h" | 5 #include "ios/chrome/browser/history/history_client_impl.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 on_bookmarks_removed_.Reset(); | 53 on_bookmarks_removed_.Reset(); |
54 } | 54 } |
55 bookmark_model_->Shutdown(); | 55 bookmark_model_->Shutdown(); |
56 } | 56 } |
57 } | 57 } |
58 | 58 |
59 bool HistoryClientImpl::CanAddURL(const GURL& url) { | 59 bool HistoryClientImpl::CanAddURL(const GURL& url) { |
60 return ios::CanAddURLToHistory(url); | 60 return ios::CanAddURLToHistory(url); |
61 } | 61 } |
62 | 62 |
63 void HistoryClientImpl::NotifyProfileError(sql::InitStatus init_status) { | 63 void HistoryClientImpl::NotifyProfileError(sql::InitStatus init_status, |
64 } | 64 const std::string& diagnostics) {} |
65 | 65 |
66 std::unique_ptr<history::HistoryBackendClient> | 66 std::unique_ptr<history::HistoryBackendClient> |
67 HistoryClientImpl::CreateBackendClient() { | 67 HistoryClientImpl::CreateBackendClient() { |
68 return base::WrapUnique(new HistoryBackendClientImpl(bookmark_model_)); | 68 return base::WrapUnique(new HistoryBackendClientImpl(bookmark_model_)); |
69 } | 69 } |
70 | 70 |
71 void HistoryClientImpl::BookmarkModelChanged() { | 71 void HistoryClientImpl::BookmarkModelChanged() { |
72 } | 72 } |
73 | 73 |
74 void HistoryClientImpl::BookmarkNodeRemoved( | 74 void HistoryClientImpl::BookmarkNodeRemoved( |
75 bookmarks::BookmarkModel* model, | 75 bookmarks::BookmarkModel* model, |
76 const bookmarks::BookmarkNode* parent, | 76 const bookmarks::BookmarkNode* parent, |
77 int old_index, | 77 int old_index, |
78 const bookmarks::BookmarkNode* node, | 78 const bookmarks::BookmarkNode* node, |
79 const std::set<GURL>& no_longer_bookmarked) { | 79 const std::set<GURL>& no_longer_bookmarked) { |
80 if (!on_bookmarks_removed_.is_null()) | 80 if (!on_bookmarks_removed_.is_null()) |
81 on_bookmarks_removed_.Run(no_longer_bookmarked); | 81 on_bookmarks_removed_.Run(no_longer_bookmarked); |
82 } | 82 } |
83 | 83 |
84 void HistoryClientImpl::BookmarkAllUserNodesRemoved( | 84 void HistoryClientImpl::BookmarkAllUserNodesRemoved( |
85 bookmarks::BookmarkModel* model, | 85 bookmarks::BookmarkModel* model, |
86 const std::set<GURL>& removed_urls) { | 86 const std::set<GURL>& removed_urls) { |
87 if (!on_bookmarks_removed_.is_null()) | 87 if (!on_bookmarks_removed_.is_null()) |
88 on_bookmarks_removed_.Run(removed_urls); | 88 on_bookmarks_removed_.Run(removed_urls); |
89 } | 89 } |
OLD | NEW |