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

Side by Side Diff: components/safe_json/utility/safe_json_parser_mojo_impl.cc

Issue 2598963005: Include-what-you-use for WrapUnique/MakeUnique. (Closed)
Patch Set: restore order of includes in x11_topmost_window_finder_interactive_uitest.cc Created 3 years, 12 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 #include "components/safe_json/utility/safe_json_parser_mojo_impl.h" 5 #include "components/safe_json/utility/safe_json_parser_mojo_impl.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/json/json_reader.h" 10 #include "base/json/json_reader.h"
11 #include "base/memory/ptr_util.h"
11 #include "base/values.h" 12 #include "base/values.h"
12 #include "mojo/public/cpp/bindings/strong_binding.h" 13 #include "mojo/public/cpp/bindings/strong_binding.h"
13 14
14 namespace safe_json { 15 namespace safe_json {
15 16
16 SafeJsonParserMojoImpl::SafeJsonParserMojoImpl() = default; 17 SafeJsonParserMojoImpl::SafeJsonParserMojoImpl() = default;
17 18
18 SafeJsonParserMojoImpl::~SafeJsonParserMojoImpl() = default; 19 SafeJsonParserMojoImpl::~SafeJsonParserMojoImpl() = default;
19 20
20 // static 21 // static
(...skipping 10 matching lines...) Expand all
31 std::unique_ptr<base::Value> value = base::JSONReader::ReadAndReturnError( 32 std::unique_ptr<base::Value> value = base::JSONReader::ReadAndReturnError(
32 json, base::JSON_PARSE_RFC, &error_code, &error); 33 json, base::JSON_PARSE_RFC, &error_code, &error);
33 if (value) { 34 if (value) {
34 callback.Run(std::move(value), base::nullopt); 35 callback.Run(std::move(value), base::nullopt);
35 } else { 36 } else {
36 callback.Run(nullptr, base::make_optional(std::move(error))); 37 callback.Run(nullptr, base::make_optional(std::move(error)));
37 } 38 }
38 } 39 }
39 40
40 } // namespace safe_json 41 } // namespace safe_json
OLDNEW
« no previous file with comments | « components/rappor/rappor_recorder_impl.cc ('k') | components/startup_metric_utils/browser/startup_metric_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698