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

Side by Side Diff: components/dom_distiller/core/distiller_page.cc

Issue 1144153004: components: Remove use of MessageLoopProxy and deprecated MessageLoop APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased. Created 5 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/dom_distiller/core/distiller_page.h" 5 #include "components/dom_distiller/core/distiller_page.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/json/json_writer.h" 8 #include "base/json/json_writer.h"
9 #include "base/location.h"
9 #include "base/logging.h" 10 #include "base/logging.h"
10 #include "base/message_loop/message_loop.h"
11 #include "base/metrics/histogram.h" 11 #include "base/metrics/histogram.h"
12 #include "base/single_thread_task_runner.h"
12 #include "base/strings/string_util.h" 13 #include "base/strings/string_util.h"
13 #include "base/strings/utf_string_conversions.h" 14 #include "base/strings/utf_string_conversions.h"
15 #include "base/thread_task_runner_handle.h"
14 #include "base/time/time.h" 16 #include "base/time/time.h"
15 #include "grit/components_resources.h" 17 #include "grit/components_resources.h"
16 #include "third_party/dom_distiller_js/dom_distiller.pb.h" 18 #include "third_party/dom_distiller_js/dom_distiller.pb.h"
17 #include "third_party/dom_distiller_js/dom_distiller_json_converter.h" 19 #include "third_party/dom_distiller_js/dom_distiller_json_converter.h"
18 #include "ui/base/resource/resource_bundle.h" 20 #include "ui/base/resource/resource_bundle.h"
19 #include "url/gurl.h" 21 #include "url/gurl.h"
20 22
21 namespace dom_distiller { 23 namespace dom_distiller {
22 24
23 namespace { 25 namespace {
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 if (statistics.has_word_count()) { 157 if (statistics.has_word_count()) {
156 UMA_HISTOGRAM_CUSTOM_COUNTS( 158 UMA_HISTOGRAM_CUSTOM_COUNTS(
157 "DomDistiller.Statistics.WordCount", 159 "DomDistiller.Statistics.WordCount",
158 statistics.word_count(), 160 statistics.word_count(),
159 1, 4000, 50); 161 1, 4000, 50);
160 } 162 }
161 } 163 }
162 } 164 }
163 } 165 }
164 166
165 base::MessageLoop::current()->PostTask( 167 base::ThreadTaskRunnerHandle::Get()->PostTask(
166 FROM_HERE, 168 FROM_HERE, base::Bind(distiller_page_callback_,
167 base::Bind(distiller_page_callback_, 169 base::Passed(&distiller_result), found_content));
168 base::Passed(&distiller_result),
169 found_content));
170 } 170 }
171 171
172 } // namespace dom_distiller 172 } // namespace dom_distiller
OLDNEW
« no previous file with comments | « components/dom_distiller/core/distilled_page_prefs.cc ('k') | components/dom_distiller/core/distiller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698