| 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 "chrome/browser/history/chrome_history_client.h" | 5 #include "chrome/browser/history/chrome_history_client.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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 bookmark_model_->Shutdown(); | 57 bookmark_model_->Shutdown(); |
| 58 } | 58 } |
| 59 } | 59 } |
| 60 | 60 |
| 61 bool ChromeHistoryClient::CanAddURL(const GURL& url) { | 61 bool ChromeHistoryClient::CanAddURL(const GURL& url) { |
| 62 return CanAddURLToHistory(url); | 62 return CanAddURLToHistory(url); |
| 63 } | 63 } |
| 64 | 64 |
| 65 void ChromeHistoryClient::NotifyProfileError(sql::InitStatus init_status, | 65 void ChromeHistoryClient::NotifyProfileError(sql::InitStatus init_status, |
| 66 const std::string& diagnostics) { | 66 const std::string& diagnostics) { |
| 67 ShowProfileErrorDialog(PROFILE_ERROR_HISTORY, | 67 ShowProfileErrorDialog(ProfileErrorType::HISTORY, |
| 68 SqlInitStatusToMessageId(init_status), diagnostics); | 68 SqlInitStatusToMessageId(init_status), diagnostics); |
| 69 } | 69 } |
| 70 | 70 |
| 71 std::unique_ptr<history::HistoryBackendClient> | 71 std::unique_ptr<history::HistoryBackendClient> |
| 72 ChromeHistoryClient::CreateBackendClient() { | 72 ChromeHistoryClient::CreateBackendClient() { |
| 73 return base::MakeUnique<ChromeHistoryBackendClient>(bookmark_model_); | 73 return base::MakeUnique<ChromeHistoryBackendClient>(bookmark_model_); |
| 74 } | 74 } |
| 75 | 75 |
| 76 void ChromeHistoryClient::BookmarkModelChanged() { | 76 void ChromeHistoryClient::BookmarkModelChanged() { |
| 77 } | 77 } |
| (...skipping 11 matching lines...) Expand all Loading... |
| 89 } | 89 } |
| 90 | 90 |
| 91 void ChromeHistoryClient::BookmarkAllUserNodesRemoved( | 91 void ChromeHistoryClient::BookmarkAllUserNodesRemoved( |
| 92 bookmarks::BookmarkModel* bookmark_model, | 92 bookmarks::BookmarkModel* bookmark_model, |
| 93 const std::set<GURL>& removed_urls) { | 93 const std::set<GURL>& removed_urls) { |
| 94 BaseBookmarkModelObserver::BookmarkAllUserNodesRemoved(bookmark_model, | 94 BaseBookmarkModelObserver::BookmarkAllUserNodesRemoved(bookmark_model, |
| 95 removed_urls); | 95 removed_urls); |
| 96 DCHECK(!on_bookmarks_removed_.is_null()); | 96 DCHECK(!on_bookmarks_removed_.is_null()); |
| 97 on_bookmarks_removed_.Run(removed_urls); | 97 on_bookmarks_removed_.Run(removed_urls); |
| 98 } | 98 } |
| OLD | NEW |