| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_IMPL_H_ | 5 #ifndef COMPONENTS_SAFE_JSON_SAFE_JSON_PARSER_IMPL_H_ |
| 6 #define COMPONENTS_SAFE_JSON_SAFE_JSON_PARSER_IMPL_H_ | 6 #define COMPONENTS_SAFE_JSON_SAFE_JSON_PARSER_IMPL_H_ |
| 7 | 7 |
| 8 #include <memory> |
| 8 #include <string> | 9 #include <string> |
| 9 | 10 |
| 10 #include "base/macros.h" | 11 #include "base/macros.h" |
| 11 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
| 12 #include "base/memory/scoped_ptr.h" | |
| 13 #include "components/safe_json/safe_json_parser.h" | 13 #include "components/safe_json/safe_json_parser.h" |
| 14 #include "content/public/browser/utility_process_host_client.h" | 14 #include "content/public/browser/utility_process_host_client.h" |
| 15 | 15 |
| 16 namespace base { | 16 namespace base { |
| 17 class ListValue; | 17 class ListValue; |
| 18 class SequencedTaskRunner; | 18 class SequencedTaskRunner; |
| 19 class Value; | 19 class Value; |
| 20 } | 20 } |
| 21 | 21 |
| 22 namespace IPC { | 22 namespace IPC { |
| (...skipping 24 matching lines...) Expand all Loading... |
| 47 bool OnMessageReceived(const IPC::Message& message) override; | 47 bool OnMessageReceived(const IPC::Message& message) override; |
| 48 | 48 |
| 49 // SafeJsonParser implementation. | 49 // SafeJsonParser implementation. |
| 50 void Start() override; | 50 void Start() override; |
| 51 | 51 |
| 52 const std::string unsafe_json_; | 52 const std::string unsafe_json_; |
| 53 SuccessCallback success_callback_; | 53 SuccessCallback success_callback_; |
| 54 ErrorCallback error_callback_; | 54 ErrorCallback error_callback_; |
| 55 scoped_refptr<base::SequencedTaskRunner> caller_task_runner_; | 55 scoped_refptr<base::SequencedTaskRunner> caller_task_runner_; |
| 56 | 56 |
| 57 scoped_ptr<base::Value> parsed_json_; | 57 std::unique_ptr<base::Value> parsed_json_; |
| 58 std::string error_; | 58 std::string error_; |
| 59 | 59 |
| 60 DISALLOW_COPY_AND_ASSIGN(SafeJsonParserImpl); | 60 DISALLOW_COPY_AND_ASSIGN(SafeJsonParserImpl); |
| 61 }; | 61 }; |
| 62 | 62 |
| 63 } // namespace safe_json | 63 } // namespace safe_json |
| 64 | 64 |
| 65 #endif // COMPONENTS_SAFE_JSON_SAFE_JSON_PARSER_IMPL_H_ | 65 #endif // COMPONENTS_SAFE_JSON_SAFE_JSON_PARSER_IMPL_H_ |
| OLD | NEW |