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

Side by Side Diff: components/safe_json/safe_json_parser_android.h

Issue 2511973004: components: Cleanup class/struct fwd declarations (Closed)
Patch Set: Rebase on top of current master branch Created 4 years 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 COMPONENTS_SAFE_JSON_SAFE_JSON_PARSER_ANDROID_H_ 5 #ifndef COMPONENTS_SAFE_JSON_SAFE_JSON_PARSER_ANDROID_H_
6 #define COMPONENTS_SAFE_JSON_SAFE_JSON_PARSER_ANDROID_H_ 6 #define COMPONENTS_SAFE_JSON_SAFE_JSON_PARSER_ANDROID_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "components/safe_json/safe_json_parser.h" 11 #include "components/safe_json/safe_json_parser.h"
12 12
13 namespace safe_json { 13 namespace safe_json {
14 14
15 class JsonSanitizer;
16
17 class SafeJsonParserAndroid : public SafeJsonParser { 15 class SafeJsonParserAndroid : public SafeJsonParser {
18 public: 16 public:
19 SafeJsonParserAndroid(const std::string& unsafe_json, 17 SafeJsonParserAndroid(const std::string& unsafe_json,
20 const SuccessCallback& success_callback, 18 const SuccessCallback& success_callback,
21 const ErrorCallback& error_callback); 19 const ErrorCallback& error_callback);
22 20
23 private: 21 private:
24 friend std::default_delete<SafeJsonParserAndroid>; 22 friend std::default_delete<SafeJsonParserAndroid>;
25 23
26 ~SafeJsonParserAndroid() override; 24 ~SafeJsonParserAndroid() override;
27 25
28 void OnSanitizationSuccess(const std::string& sanitized_json); 26 void OnSanitizationSuccess(const std::string& sanitized_json);
29 void OnSanitizationError(const std::string& error); 27 void OnSanitizationError(const std::string& error);
30 28
31 // SafeJsonParser implementation. 29 // SafeJsonParser implementation.
32 void Start() override; 30 void Start() override;
33 31
34 const std::string unsafe_json_; 32 const std::string unsafe_json_;
35 SuccessCallback success_callback_; 33 SuccessCallback success_callback_;
36 ErrorCallback error_callback_; 34 ErrorCallback error_callback_;
37 35
38 DISALLOW_COPY_AND_ASSIGN(SafeJsonParserAndroid); 36 DISALLOW_COPY_AND_ASSIGN(SafeJsonParserAndroid);
39 }; 37 };
40 38
41 } // namespace safe_json 39 } // namespace safe_json
42 40
43 #endif // COMPONENTS_SAFE_JSON_SAFE_JSON_PARSER_ANDROID_H_ 41 #endif // COMPONENTS_SAFE_JSON_SAFE_JSON_PARSER_ANDROID_H_
OLDNEW
« no previous file with comments | « components/safe_browsing_db/test_database_manager.h ('k') | components/search_engines/search_engine_data_type_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698