refactor: pass base::Value by value in JS API implementations (#20809)
* refactor: move the arg instead of const reference it * refactor: avoid unnecessary copies of base::Value in arg * refactor: pass-by-value in dict_util * refactor: avoid unnecessary reference
This commit is contained in:
parent
c03ed6d3a1
commit
0ab9cc30d2
26 changed files with 108 additions and 144 deletions
|
@ -5,8 +5,6 @@
|
|||
#ifndef SHELL_BROWSER_MAC_DICT_UTIL_H_
|
||||
#define SHELL_BROWSER_MAC_DICT_UTIL_H_
|
||||
|
||||
#include <memory>
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
namespace base {
|
||||
|
@ -17,13 +15,9 @@ class DictionaryValue;
|
|||
namespace electron {
|
||||
|
||||
NSArray* ListValueToNSArray(const base::ListValue& value);
|
||||
|
||||
std::unique_ptr<base::ListValue> NSArrayToListValue(NSArray* arr);
|
||||
|
||||
base::ListValue NSArrayToListValue(NSArray* arr);
|
||||
NSDictionary* DictionaryValueToNSDictionary(const base::DictionaryValue& value);
|
||||
|
||||
std::unique_ptr<base::DictionaryValue> NSDictionaryToDictionaryValue(
|
||||
NSDictionary* dict);
|
||||
base::DictionaryValue NSDictionaryToDictionaryValue(NSDictionary* dict);
|
||||
|
||||
} // namespace electron
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue