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

Side by Side Diff: chrome/browser/extensions/api/bookmark_manager_private/bookmark_manager_private_api.cc

Issue 297833006: Move ScopedGroupBookmarkActions into bookmarks namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/ui/bookmarks/bookmark_drag_drop.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/extensions/api/bookmark_manager_private/bookmark_manage r_private_api.h" 5 #include "chrome/browser/extensions/api/bookmark_manager_private/bookmark_manage r_private_api.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "base/memory/linked_ptr.h" 10 #include "base/memory/linked_ptr.h"
(...skipping 714 matching lines...) Expand 10 before | Expand all | Expand 10 after
725 SetResult(new base::FundamentalValue(can_open_new_windows)); 725 SetResult(new base::FundamentalValue(can_open_new_windows));
726 return true; 726 return true;
727 } 727 }
728 728
729 bool BookmarkManagerPrivateRemoveTreesFunction::RunOnReady() { 729 bool BookmarkManagerPrivateRemoveTreesFunction::RunOnReady() {
730 scoped_ptr<RemoveTrees::Params> params(RemoveTrees::Params::Create(*args_)); 730 scoped_ptr<RemoveTrees::Params> params(RemoveTrees::Params::Create(*args_));
731 EXTENSION_FUNCTION_VALIDATE(params); 731 EXTENSION_FUNCTION_VALIDATE(params);
732 732
733 BookmarkModel* model = BookmarkModelFactory::GetForProfile(GetProfile()); 733 BookmarkModel* model = BookmarkModelFactory::GetForProfile(GetProfile());
734 #if !defined(OS_ANDROID) 734 #if !defined(OS_ANDROID)
735 ScopedGroupBookmarkActions group_deletes(model); 735 bookmarks::ScopedGroupBookmarkActions group_deletes(model);
736 #endif 736 #endif
737 int64 id; 737 int64 id;
738 for (size_t i = 0; i < params->id_list.size(); ++i) { 738 for (size_t i = 0; i < params->id_list.size(); ++i) {
739 if (!GetBookmarkIdAsInt64(params->id_list[i], &id)) 739 if (!GetBookmarkIdAsInt64(params->id_list[i], &id))
740 return false; 740 return false;
741 if (!bookmark_api_helpers::RemoveNode(model, id, true, &error_)) 741 if (!bookmark_api_helpers::RemoveNode(model, id, true, &error_))
742 return false; 742 return false;
743 } 743 }
744 744
745 return true; 745 return true;
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
787 result.enabled = undo_manager->redo_count() > 0; 787 result.enabled = undo_manager->redo_count() > 0;
788 result.label = base::UTF16ToUTF8(undo_manager->GetRedoLabel()); 788 result.label = base::UTF16ToUTF8(undo_manager->GetRedoLabel());
789 789
790 results_ = RedoInfo::Results::Create(result); 790 results_ = RedoInfo::Results::Create(result);
791 #endif // !defined(OS_ANDROID) 791 #endif // !defined(OS_ANDROID)
792 792
793 return true; 793 return true;
794 } 794 }
795 795
796 } // namespace extensions 796 } // namespace extensions
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/bookmarks/bookmark_drag_drop.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698