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

Side by Side Diff: components/safe_json/safe_json_parser_impl.cc

Issue 2076163002: Migrate SequencedTaskRunnerHandle calls to TaskRunnerHandle calls. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mix_c_Ab_1_scheduler_support_parallelTRH
Patch Set: Created 4 years, 6 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 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 #include "components/safe_json/safe_json_parser_impl.h" 5 #include "components/safe_json/safe_json_parser_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/sequenced_task_runner.h" 9 #include "base/sequenced_task_runner.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
11 #include "base/threading/sequenced_task_runner_handle.h" 11 #include "base/threading/task_runner_handle.h"
12 #include "base/threading/thread_task_runner_handle.h"
13 #include "base/tuple.h" 12 #include "base/tuple.h"
14 #include "base/values.h" 13 #include "base/values.h"
15 #include "content/public/browser/browser_thread.h" 14 #include "content/public/browser/browser_thread.h"
16 #include "content/public/browser/utility_process_host.h" 15 #include "content/public/browser/utility_process_host.h"
17 #include "content/public/common/service_registry.h" 16 #include "content/public/common/service_registry.h"
18 #include "grit/components_strings.h" 17 #include "grit/components_strings.h"
19 #include "ui/base/l10n/l10n_util.h" 18 #include "ui/base/l10n/l10n_util.h"
20 19
21 using content::BrowserThread; 20 using content::BrowserThread;
22 using content::UtilityProcessHost; 21 using content::UtilityProcessHost;
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 const base::Value* value = NULL; 103 const base::Value* value = NULL;
105 CHECK(wrapper.Get(0, &value)); 104 CHECK(wrapper.Get(0, &value));
106 parsed_json_.reset(value->DeepCopy()); 105 parsed_json_.reset(value->DeepCopy());
107 } else { 106 } else {
108 error_ = error.get(); 107 error_ = error.get();
109 } 108 }
110 ReportResults(); 109 ReportResults();
111 } 110 }
112 111
113 void SafeJsonParserImpl::Start() { 112 void SafeJsonParserImpl::Start() {
114 caller_task_runner_ = base::SequencedTaskRunnerHandle::Get(); 113 caller_task_runner_ = base::TaskRunnerHandle::Get();
115 114
116 BrowserThread::PostTask( 115 BrowserThread::PostTask(
117 BrowserThread::IO, FROM_HERE, 116 BrowserThread::IO, FROM_HERE,
118 base::Bind(&SafeJsonParserImpl::StartWorkOnIOThread, this)); 117 base::Bind(&SafeJsonParserImpl::StartWorkOnIOThread, this));
119 } 118 }
120 119
121 } // namespace safe_json 120 } // namespace safe_json
OLDNEW
« no previous file with comments | « components/safe_json/safe_json_parser_impl.h ('k') | content/browser/download/url_downloader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698