Chromium Code Reviews| 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_model.h" | 5 #include "chrome/browser/bookmarks/bookmark_model.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <functional> | 8 #include <functional> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 661 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 672 | 672 |
| 673 FOR_EACH_OBSERVER(BookmarkModelObserver, observers_, | 673 FOR_EACH_OBSERVER(BookmarkModelObserver, observers_, |
| 674 BookmarkNodeRemoved(this, parent, index, node.get())); | 674 BookmarkNodeRemoved(this, parent, index, node.get())); |
| 675 | 675 |
| 676 if (details.changed_urls.empty()) { | 676 if (details.changed_urls.empty()) { |
| 677 // No point in sending out notification if the starred state didn't change. | 677 // No point in sending out notification if the starred state didn't change. |
| 678 return; | 678 return; |
| 679 } | 679 } |
| 680 | 680 |
| 681 if (profile_) { | 681 if (profile_) { |
| 682 HistoryService* history = | 682 HistoryService* history = HistoryServiceFactory::GetForProfileIfExists( |
| 683 HistoryServiceFactory::GetForProfile(profile_, | 683 profile_, Profile::EXPLICIT_ACCESS); |
|
sky
2012/06/21 17:14:31
Keep this as it was.
| |
| 684 Profile::EXPLICIT_ACCESS); | |
| 685 if (history) | 684 if (history) |
| 686 history->URLsNoLongerBookmarked(details.changed_urls); | 685 history->URLsNoLongerBookmarked(details.changed_urls); |
| 687 } | 686 } |
| 688 | 687 |
| 689 content::NotificationService::current()->Notify( | 688 content::NotificationService::current()->Notify( |
| 690 chrome::NOTIFICATION_URLS_STARRED, | 689 chrome::NOTIFICATION_URLS_STARRED, |
| 691 content::Source<Profile>(profile_), | 690 content::Source<Profile>(profile_), |
| 692 content::Details<history::URLsStarredDetails>(&details)); | 691 content::Details<history::URLsStarredDetails>(&details)); |
| 693 } | 692 } |
| 694 | 693 |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 863 BookmarkLoadDetails* BookmarkModel::CreateLoadDetails() { | 862 BookmarkLoadDetails* BookmarkModel::CreateLoadDetails() { |
| 864 BookmarkPermanentNode* bb_node = | 863 BookmarkPermanentNode* bb_node = |
| 865 CreatePermanentNode(BookmarkNode::BOOKMARK_BAR); | 864 CreatePermanentNode(BookmarkNode::BOOKMARK_BAR); |
| 866 BookmarkPermanentNode* other_node = | 865 BookmarkPermanentNode* other_node = |
| 867 CreatePermanentNode(BookmarkNode::OTHER_NODE); | 866 CreatePermanentNode(BookmarkNode::OTHER_NODE); |
| 868 BookmarkPermanentNode* mobile_node = | 867 BookmarkPermanentNode* mobile_node = |
| 869 CreatePermanentNode(BookmarkNode::MOBILE); | 868 CreatePermanentNode(BookmarkNode::MOBILE); |
| 870 return new BookmarkLoadDetails(bb_node, other_node, mobile_node, | 869 return new BookmarkLoadDetails(bb_node, other_node, mobile_node, |
| 871 new BookmarkIndex(profile_), next_node_id_); | 870 new BookmarkIndex(profile_), next_node_id_); |
| 872 } | 871 } |
| OLD | NEW |