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/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 616 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
627 bookmark_api_helpers::AddNodeFoldersOnly(client, node, &nodes, true); | 627 bookmark_api_helpers::AddNodeFoldersOnly(client, node, &nodes, true); |
628 else | 628 else |
629 bookmark_api_helpers::AddNode(client, node, &nodes, true); | 629 bookmark_api_helpers::AddNode(client, node, &nodes, true); |
630 results_ = GetSubtree::Results::Create(nodes); | 630 results_ = GetSubtree::Results::Create(nodes); |
631 return true; | 631 return true; |
632 } | 632 } |
633 | 633 |
634 bool BookmarkManagerPrivateCanEditFunction::RunOnReady() { | 634 bool BookmarkManagerPrivateCanEditFunction::RunOnReady() { |
635 PrefService* prefs = user_prefs::UserPrefs::Get(GetProfile()); | 635 PrefService* prefs = user_prefs::UserPrefs::Get(GetProfile()); |
636 SetResult(new base::FundamentalValue( | 636 SetResult(new base::FundamentalValue( |
637 prefs->GetBoolean(prefs::kEditBookmarksEnabled))); | 637 prefs->GetBoolean(bookmarks::prefs::kEditBookmarksEnabled))); |
638 return true; | 638 return true; |
639 } | 639 } |
640 | 640 |
641 bool BookmarkManagerPrivateRecordLaunchFunction::RunOnReady() { | 641 bool BookmarkManagerPrivateRecordLaunchFunction::RunOnReady() { |
642 RecordBookmarkLaunch(NULL, BOOKMARK_LAUNCH_LOCATION_MANAGER); | 642 RecordBookmarkLaunch(NULL, BOOKMARK_LAUNCH_LOCATION_MANAGER); |
643 return true; | 643 return true; |
644 } | 644 } |
645 | 645 |
646 bool BookmarkManagerPrivateCreateWithMetaInfoFunction::RunOnReady() { | 646 bool BookmarkManagerPrivateCreateWithMetaInfoFunction::RunOnReady() { |
647 scoped_ptr<CreateWithMetaInfo::Params> params( | 647 scoped_ptr<CreateWithMetaInfo::Params> params( |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
801 | 801 |
802 RedoInfo::Results::Result result; | 802 RedoInfo::Results::Result result; |
803 result.enabled = undo_manager->redo_count() > 0; | 803 result.enabled = undo_manager->redo_count() > 0; |
804 result.label = base::UTF16ToUTF8(undo_manager->GetRedoLabel()); | 804 result.label = base::UTF16ToUTF8(undo_manager->GetRedoLabel()); |
805 | 805 |
806 results_ = RedoInfo::Results::Create(result); | 806 results_ = RedoInfo::Results::Create(result); |
807 return true; | 807 return true; |
808 } | 808 } |
809 | 809 |
810 } // namespace extensions | 810 } // namespace extensions |
OLD | NEW |