Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(162)

Side by Side Diff: components/bookmarks/browser/bookmark_model.cc

Issue 338593002: Set metainfo ID for enhanced bookmarks extension (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: add comments for hash values Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/bookmarks/browser/bookmark_model.h" 5 #include "components/bookmarks/browser/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 861 matching lines...) Expand 10 before | Expand all | Expand 10 after
872 removed_urls->erase(i++); 872 removed_urls->erase(i++);
873 } else { 873 } else {
874 ++i; 874 ++i;
875 } 875 }
876 } 876 }
877 } 877 }
878 878
879 BookmarkNode* BookmarkModel::AddNode(BookmarkNode* parent, 879 BookmarkNode* BookmarkModel::AddNode(BookmarkNode* parent,
880 int index, 880 int index,
881 BookmarkNode* node) { 881 BookmarkNode* node) {
882 FOR_EACH_OBSERVER(BookmarkModelObserver, observers_,
883 OnWillAddBookmarkNode(this, node));
884
882 parent->Add(node, index); 885 parent->Add(node, index);
883 886
884 if (store_.get()) 887 if (store_.get())
885 store_->ScheduleSave(); 888 store_->ScheduleSave();
886 889
887 FOR_EACH_OBSERVER(BookmarkModelObserver, observers_, 890 FOR_EACH_OBSERVER(BookmarkModelObserver, observers_,
888 BookmarkNodeAdded(this, parent, index)); 891 BookmarkNodeAdded(this, parent, index));
889 892
890 index_->Add(node); 893 index_->Add(node);
891 894
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
1005 BookmarkPermanentNode* mobile_node = 1008 BookmarkPermanentNode* mobile_node =
1006 CreatePermanentNode(BookmarkNode::MOBILE); 1009 CreatePermanentNode(BookmarkNode::MOBILE);
1007 return scoped_ptr<BookmarkLoadDetails>(new BookmarkLoadDetails( 1010 return scoped_ptr<BookmarkLoadDetails>(new BookmarkLoadDetails(
1008 bb_node, 1011 bb_node,
1009 other_node, 1012 other_node,
1010 mobile_node, 1013 mobile_node,
1011 client_->GetLoadExtraNodesCallback(), 1014 client_->GetLoadExtraNodesCallback(),
1012 new BookmarkIndex(client_, index_urls_, accept_languages), 1015 new BookmarkIndex(client_, index_urls_, accept_languages),
1013 next_node_id_)); 1016 next_node_id_));
1014 } 1017 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/bookmarks/bookmarks_api.cc ('k') | components/bookmarks/browser/bookmark_model_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698