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 583 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
594 } | 594 } |
595 | 595 |
596 bool BookmarkManagerPrivateCanEditFunction::RunImpl() { | 596 bool BookmarkManagerPrivateCanEditFunction::RunImpl() { |
597 PrefService* prefs = user_prefs::UserPrefs::Get(GetProfile()); | 597 PrefService* prefs = user_prefs::UserPrefs::Get(GetProfile()); |
598 SetResult(new base::FundamentalValue( | 598 SetResult(new base::FundamentalValue( |
599 prefs->GetBoolean(prefs::kEditBookmarksEnabled))); | 599 prefs->GetBoolean(prefs::kEditBookmarksEnabled))); |
600 return true; | 600 return true; |
601 } | 601 } |
602 | 602 |
603 bool BookmarkManagerPrivateRecordLaunchFunction::RunImpl() { | 603 bool BookmarkManagerPrivateRecordLaunchFunction::RunImpl() { |
604 RecordBookmarkLaunch(NULL, BOOKMARK_LAUNCH_LOCATION_MANAGER); | 604 BookmarkModel* model = BookmarkModelFactory::GetForProfile(GetProfile()); |
| 605 RecordBookmarkLaunch(model, NULL, BOOKMARK_LAUNCH_LOCATION_MANAGER); |
605 return true; | 606 return true; |
606 } | 607 } |
607 | 608 |
608 bool BookmarkManagerPrivateGetMetaInfoFunction::RunImpl() { | 609 bool BookmarkManagerPrivateGetMetaInfoFunction::RunImpl() { |
609 scoped_ptr<GetMetaInfo::Params> params(GetMetaInfo::Params::Create(*args_)); | 610 scoped_ptr<GetMetaInfo::Params> params(GetMetaInfo::Params::Create(*args_)); |
610 EXTENSION_FUNCTION_VALIDATE(params); | 611 EXTENSION_FUNCTION_VALIDATE(params); |
611 | 612 |
612 const BookmarkNode* node = GetBookmarkNodeFromId(params->id); | 613 const BookmarkNode* node = GetBookmarkNodeFromId(params->id); |
613 if (!node) | 614 if (!node) |
614 return false; | 615 return false; |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
705 result.enabled = undo_manager->redo_count() > 0; | 706 result.enabled = undo_manager->redo_count() > 0; |
706 result.label = base::UTF16ToUTF8(undo_manager->GetRedoLabel()); | 707 result.label = base::UTF16ToUTF8(undo_manager->GetRedoLabel()); |
707 | 708 |
708 results_ = RedoInfo::Results::Create(result); | 709 results_ = RedoInfo::Results::Create(result); |
709 #endif // !defined(OS_ANDROID) | 710 #endif // !defined(OS_ANDROID) |
710 | 711 |
711 return true; | 712 return true; |
712 } | 713 } |
713 | 714 |
714 } // namespace extensions | 715 } // namespace extensions |
OLD | NEW |