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

Side by Side Diff: chrome/browser/extensions/api/context_menus/context_menus_api_helpers.h

Issue 1549233002: Convert Pass()→std::move() in //chrome/browser/extensions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 11 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 // Definition of helper functions for the ContextMenus API. 5 // Definition of helper functions for the ContextMenus API.
6 6
7 #ifndef CHROME_BROWSER_EXTENSIONS_API_CONTEXT_MENUS_CONTEXT_MENUS_API_HELPERS_H_ 7 #ifndef CHROME_BROWSER_EXTENSIONS_API_CONTEXT_MENUS_CONTEXT_MENUS_API_HELPERS_H_
8 #define CHROME_BROWSER_EXTENSIONS_API_CONTEXT_MENUS_CONTEXT_MENUS_API_HELPERS_H_ 8 #define CHROME_BROWSER_EXTENSIONS_API_CONTEXT_MENUS_CONTEXT_MENUS_API_HELPERS_H_
9 9
10 #include "chrome/browser/extensions/menu_manager.h" 10 #include "chrome/browser/extensions/menu_manager.h"
(...skipping 16 matching lines...) Expand all
27 return scoped_ptr<extensions::MenuItem::Id>(); 27 return scoped_ptr<extensions::MenuItem::Id>();
28 28
29 scoped_ptr<extensions::MenuItem::Id> parent_id( 29 scoped_ptr<extensions::MenuItem::Id> parent_id(
30 new extensions::MenuItem::Id(is_off_the_record, key)); 30 new extensions::MenuItem::Id(is_off_the_record, key));
31 if (property.parent_id->as_integer) 31 if (property.parent_id->as_integer)
32 parent_id->uid = *property.parent_id->as_integer; 32 parent_id->uid = *property.parent_id->as_integer;
33 else if (property.parent_id->as_string) 33 else if (property.parent_id->as_string)
34 parent_id->string_uid = *property.parent_id->as_string; 34 parent_id->string_uid = *property.parent_id->as_string;
35 else 35 else
36 NOTREACHED(); 36 NOTREACHED();
37 return parent_id.Pass(); 37 return parent_id;
38 } 38 }
39 39
40 } // namespace 40 } // namespace
41 41
42 extern const char kActionNotAllowedError[]; 42 extern const char kActionNotAllowedError[];
43 extern const char kCannotFindItemError[]; 43 extern const char kCannotFindItemError[];
44 extern const char kCheckedError[]; 44 extern const char kCheckedError[];
45 extern const char kDuplicateIDError[]; 45 extern const char kDuplicateIDError[];
46 extern const char kGeneratedIdKey[]; 46 extern const char kGeneratedIdKey[];
47 extern const char kLauncherNotAllowedError[]; 47 extern const char kLauncherNotAllowedError[];
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 return false; 258 return false;
259 259
260 menu_manager->WriteToStorage(extension, item_id.extension_key); 260 menu_manager->WriteToStorage(extension, item_id.extension_key);
261 return true; 261 return true;
262 } 262 }
263 263
264 } // namespace context_menus_api_helpers 264 } // namespace context_menus_api_helpers
265 } // namespace extensions 265 } // namespace extensions
266 266
267 #endif // CHROME_BROWSER_EXTENSIONS_API_CONTEXT_MENUS_CONTEXT_MENUS_API_HELPERS _H_ 267 #endif // CHROME_BROWSER_EXTENSIONS_API_CONTEXT_MENUS_CONTEXT_MENUS_API_HELPERS _H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/commands/command_service.cc ('k') | chrome/browser/extensions/api/cookies/cookies_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698