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/context_menus/context_menus_api.h" | 5 #include "chrome/browser/extensions/api/context_menus/context_menus_api.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/strings/string_util.h" | 9 #include "base/strings/string_util.h" |
10 #include "base/values.h" | 10 #include "base/values.h" |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 } | 95 } |
96 | 96 |
97 if (!manager->RemoveContextMenuItem(id)) | 97 if (!manager->RemoveContextMenuItem(id)) |
98 return false; | 98 return false; |
99 manager->WriteToStorage(GetExtension()); | 99 manager->WriteToStorage(GetExtension()); |
100 return true; | 100 return true; |
101 } | 101 } |
102 | 102 |
103 bool ContextMenusRemoveAllFunction::RunImpl() { | 103 bool ContextMenusRemoveAllFunction::RunImpl() { |
104 MenuManager* manager = MenuManager::Get(GetProfile()); | 104 MenuManager* manager = MenuManager::Get(GetProfile()); |
105 manager->RemoveAllContextItems(GetExtension()->id()); | 105 manager->RemoveAllContextItems(MenuItem::ExtensionKey(GetExtension()->id())); |
106 manager->WriteToStorage(GetExtension()); | 106 manager->WriteToStorage(GetExtension()); |
107 return true; | 107 return true; |
108 } | 108 } |
109 | 109 |
110 } // namespace extensions | 110 } // namespace extensions |
OLD | NEW |