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

Side by Side Diff: chrome/browser/extensions/extension_function_test_utils.h

Issue 1871713002: Convert //chrome/browser/extensions from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and fix header Created 4 years, 8 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 (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 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_FUNCTION_TEST_UTILS_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_FUNCTION_TEST_UTILS_H_
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_FUNCTION_TEST_UTILS_H_ 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_FUNCTION_TEST_UTILS_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
11 #include "extensions/common/manifest.h" 11 #include "extensions/common/manifest.h"
12 12
13 class Browser; 13 class Browser;
14 class UIThreadExtensionFunction; 14 class UIThreadExtensionFunction;
15 15
16 namespace base { 16 namespace base {
17 class Value; 17 class Value;
18 class DictionaryValue; 18 class DictionaryValue;
19 class ListValue; 19 class ListValue;
20 } 20 }
21 21
22 namespace extensions { 22 namespace extensions {
23 class Extension; 23 class Extension;
24 } 24 }
25 25
26 // TODO(ckehoe): Accept args as scoped_ptr<base::Value>, 26 // TODO(ckehoe): Accept args as std::unique_ptr<base::Value>,
27 // and migrate existing users to the new API. 27 // and migrate existing users to the new API.
28 // This file is DEPRECATED. New tests should use the versions in 28 // This file is DEPRECATED. New tests should use the versions in
29 // extensions/browser/api_test_utils.h. 29 // extensions/browser/api_test_utils.h.
30 namespace extension_function_test_utils { 30 namespace extension_function_test_utils {
31 31
32 // Parse JSON and return as the specified type, or NULL if the JSON is invalid 32 // Parse JSON and return as the specified type, or NULL if the JSON is invalid
33 // or not the specified type. 33 // or not the specified type.
34 base::Value* ParseJSON(const std::string& data); 34 base::Value* ParseJSON(const std::string& data);
35 base::ListValue* ParseList(const std::string& data); 35 base::ListValue* ParseList(const std::string& data);
36 36
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 // close to what the bindings would actually send. 81 // close to what the bindings would actually send.
82 // 82 //
83 // TODO(aa): I'm concerned that this style won't scale to all the bits and bobs 83 // TODO(aa): I'm concerned that this style won't scale to all the bits and bobs
84 // we're going to need to frob for all the different extension functions. But 84 // we're going to need to frob for all the different extension functions. But
85 // we can refactor when we see what is needed. 85 // we can refactor when we see what is needed.
86 bool RunFunction(UIThreadExtensionFunction* function, 86 bool RunFunction(UIThreadExtensionFunction* function,
87 const std::string& args, 87 const std::string& args,
88 Browser* browser, 88 Browser* browser,
89 RunFunctionFlags flags); 89 RunFunctionFlags flags);
90 bool RunFunction(UIThreadExtensionFunction* function, 90 bool RunFunction(UIThreadExtensionFunction* function,
91 scoped_ptr<base::ListValue> args, 91 std::unique_ptr<base::ListValue> args,
92 Browser* browser, 92 Browser* browser,
93 RunFunctionFlags flags); 93 RunFunctionFlags flags);
94 94
95 } // namespace extension_function_test_utils 95 } // namespace extension_function_test_utils
96 96
97 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_FUNCTION_TEST_UTILS_H_ 97 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_FUNCTION_TEST_UTILS_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_error_ui_default.h ('k') | chrome/browser/extensions/extension_function_test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698