| 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/json/json_writer.h" | 9 #include "base/json/json_writer.h" |
| 10 #include "base/prefs/pref_service.h" | 10 #include "base/prefs/pref_service.h" |
| (...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 514 } | 514 } |
| 515 | 515 |
| 516 bool BookmarkManagerPrivateCanEditFunction::RunImpl() { | 516 bool BookmarkManagerPrivateCanEditFunction::RunImpl() { |
| 517 PrefService* prefs = user_prefs::UserPrefs::Get(profile_); | 517 PrefService* prefs = user_prefs::UserPrefs::Get(profile_); |
| 518 SetResult(new base::FundamentalValue( | 518 SetResult(new base::FundamentalValue( |
| 519 prefs->GetBoolean(prefs::kEditBookmarksEnabled))); | 519 prefs->GetBoolean(prefs::kEditBookmarksEnabled))); |
| 520 return true; | 520 return true; |
| 521 } | 521 } |
| 522 | 522 |
| 523 bool BookmarkManagerPrivateRecordLaunchFunction::RunImpl() { | 523 bool BookmarkManagerPrivateRecordLaunchFunction::RunImpl() { |
| 524 RecordBookmarkLaunch(BOOKMARK_LAUNCH_LOCATION_MANAGER); | 524 RecordBookmarkLaunch(NULL, BOOKMARK_LAUNCH_LOCATION_MANAGER); |
| 525 return true; | 525 return true; |
| 526 } | 526 } |
| 527 | 527 |
| 528 bool BookmarkManagerPrivateCanOpenNewWindowsFunction::RunImpl() { | 528 bool BookmarkManagerPrivateCanOpenNewWindowsFunction::RunImpl() { |
| 529 bool can_open_new_windows = true; | 529 bool can_open_new_windows = true; |
| 530 | 530 |
| 531 #if defined(OS_WIN) | 531 #if defined(OS_WIN) |
| 532 if (win8::IsSingleWindowMetroMode()) | 532 if (win8::IsSingleWindowMetroMode()) |
| 533 can_open_new_windows = false; | 533 can_open_new_windows = false; |
| 534 #endif // OS_WIN | 534 #endif // OS_WIN |
| (...skipping 14 matching lines...) Expand all Loading... |
| 549 return false; | 549 return false; |
| 550 } | 550 } |
| 551 if (!bookmark_api_helpers::RemoveNode(model, id, true, &error_)) | 551 if (!bookmark_api_helpers::RemoveNode(model, id, true, &error_)) |
| 552 return false; | 552 return false; |
| 553 } | 553 } |
| 554 | 554 |
| 555 return true; | 555 return true; |
| 556 } | 556 } |
| 557 | 557 |
| 558 } // namespace extensions | 558 } // namespace extensions |
| OLD | NEW |