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

Side by Side Diff: content/renderer/render_thread_impl.cc

Issue 2240043002: Remove WTF_LOG(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: foo Created 4 years, 4 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
« no previous file with comments | « content/public/common/content_switches.cc ('k') | content/test/blink_test_environment.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "content/renderer/render_thread_impl.h" 5 #include "content/renderer/render_thread_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <map> 9 #include <map>
10 #include <utility> 10 #include <utility>
11 #include <vector> 11 #include <vector>
12 12
13 #include "base/allocator/allocator_extension.h" 13 #include "base/allocator/allocator_extension.h"
14 #include "base/command_line.h" 14 #include "base/command_line.h"
15 #include "base/debug/crash_logging.h" 15 #include "base/debug/crash_logging.h"
16 #include "base/lazy_instance.h" 16 #include "base/lazy_instance.h"
17 #include "base/logging.h" 17 #include "base/logging.h"
18 #include "base/macros.h" 18 #include "base/macros.h"
19 #include "base/memory/discardable_memory_allocator.h" 19 #include "base/memory/discardable_memory_allocator.h"
20 #include "base/memory/ptr_util.h" 20 #include "base/memory/ptr_util.h"
21 #include "base/memory/shared_memory.h" 21 #include "base/memory/shared_memory.h"
22 #include "base/metrics/field_trial.h" 22 #include "base/metrics/field_trial.h"
23 #include "base/metrics/histogram.h" 23 #include "base/metrics/histogram.h"
24 #include "base/path_service.h" 24 #include "base/path_service.h"
25 #include "base/run_loop.h" 25 #include "base/run_loop.h"
26 #include "base/strings/string16.h" 26 #include "base/strings/string16.h"
27 #include "base/strings/string_number_conversions.h" 27 #include "base/strings/string_number_conversions.h"
28 #include "base/strings/string_split.h" 28 #include "base/strings/string_split.h"
29 #include "base/strings/string_tokenizer.h"
30 #include "base/strings/sys_string_conversions.h" 29 #include "base/strings/sys_string_conversions.h"
31 #include "base/strings/utf_string_conversions.h" 30 #include "base/strings/utf_string_conversions.h"
32 #include "base/threading/simple_thread.h" 31 #include "base/threading/simple_thread.h"
33 #include "base/threading/thread_local.h" 32 #include "base/threading/thread_local.h"
34 #include "base/threading/thread_restrictions.h" 33 #include "base/threading/thread_restrictions.h"
35 #include "base/threading/thread_task_runner_handle.h" 34 #include "base/threading/thread_task_runner_handle.h"
36 #include "base/trace_event/trace_event.h" 35 #include "base/trace_event/trace_event.h"
37 #include "base/values.h" 36 #include "base/values.h"
38 #include "build/build_config.h" 37 #include "build/build_config.h"
39 #include "cc/base/histograms.h" 38 #include "cc/base/histograms.h"
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 base::Histogram* histogram = static_cast<base::Histogram*>(hist); 317 base::Histogram* histogram = static_cast<base::Histogram*>(hist);
319 histogram->Add(sample); 318 histogram->Add(sample);
320 } 319 }
321 320
322 std::unique_ptr<cc::SharedBitmap> AllocateSharedBitmapFunction( 321 std::unique_ptr<cc::SharedBitmap> AllocateSharedBitmapFunction(
323 const gfx::Size& size) { 322 const gfx::Size& size) {
324 return ChildThreadImpl::current()->shared_bitmap_manager()-> 323 return ChildThreadImpl::current()->shared_bitmap_manager()->
325 AllocateSharedBitmap(size); 324 AllocateSharedBitmap(size);
326 } 325 }
327 326
328 void EnableBlinkPlatformLogChannels(const std::string& channels) {
329 if (channels.empty())
330 return;
331 base::StringTokenizer t(channels, ", ");
332 while (t.GetNext())
333 blink::enableLogChannel(t.token().c_str());
334 }
335
336 void NotifyTimezoneChangeOnThisThread() { 327 void NotifyTimezoneChangeOnThisThread() {
337 v8::Isolate* isolate = v8::Isolate::GetCurrent(); 328 v8::Isolate* isolate = v8::Isolate::GetCurrent();
338 if (!isolate) 329 if (!isolate)
339 return; 330 return;
340 v8::Date::DateTimeConfigurationChangeNotification(isolate); 331 v8::Date::DateTimeConfigurationChangeNotification(isolate);
341 } 332 }
342 333
343 class FrameFactoryImpl : public mojom::FrameFactory { 334 class FrameFactoryImpl : public mojom::FrameFactory {
344 public: 335 public:
345 explicit FrameFactoryImpl(mojom::FrameFactoryRequest request) 336 explicit FrameFactoryImpl(mojom::FrameFactoryRequest request)
(...skipping 898 matching lines...) Expand 10 before | Expand all | Expand 10 after
1244 compositor_impl_side_task_runner = compositor_task_runner_; 1235 compositor_impl_side_task_runner = compositor_task_runner_;
1245 else 1236 else
1246 compositor_impl_side_task_runner = base::ThreadTaskRunnerHandle::Get(); 1237 compositor_impl_side_task_runner = base::ThreadTaskRunnerHandle::Get();
1247 1238
1248 compositor_message_filter_ = new CompositorForwardingMessageFilter( 1239 compositor_message_filter_ = new CompositorForwardingMessageFilter(
1249 compositor_impl_side_task_runner.get()); 1240 compositor_impl_side_task_runner.get());
1250 AddFilter(compositor_message_filter_.get()); 1241 AddFilter(compositor_message_filter_.get());
1251 1242
1252 RenderThreadImpl::RegisterSchemes(); 1243 RenderThreadImpl::RegisterSchemes();
1253 1244
1254 EnableBlinkPlatformLogChannels(
1255 command_line.GetSwitchValueASCII(switches::kBlinkPlatformLogChannels));
1256
1257 RenderMediaClient::Initialize(); 1245 RenderMediaClient::Initialize();
1258 1246
1259 devtools_agent_message_filter_ = new DevToolsAgentFilter(); 1247 devtools_agent_message_filter_ = new DevToolsAgentFilter();
1260 AddFilter(devtools_agent_message_filter_.get()); 1248 AddFilter(devtools_agent_message_filter_.get());
1261 1249
1262 v8_sampling_profiler_.reset(new V8SamplingProfiler()); 1250 v8_sampling_profiler_.reset(new V8SamplingProfiler());
1263 1251
1264 if (GetContentClient()->renderer()->RunIdleHandlerWhenWidgetsHidden()) { 1252 if (GetContentClient()->renderer()->RunIdleHandlerWhenWidgetsHidden()) {
1265 ScheduleIdleHandler(kLongIdleHandlerDelayMs); 1253 ScheduleIdleHandler(kLongIdleHandlerDelayMs);
1266 } else { 1254 } else {
(...skipping 974 matching lines...) Expand 10 before | Expand all | Expand 10 after
2241 v8_memory_pressure_level == v8::MemoryPressureLevel::kCritical) 2229 v8_memory_pressure_level == v8::MemoryPressureLevel::kCritical)
2242 v8_memory_pressure_level = v8::MemoryPressureLevel::kModerate; 2230 v8_memory_pressure_level = v8::MemoryPressureLevel::kModerate;
2243 2231
2244 blink::mainThreadIsolate()->MemoryPressureNotification( 2232 blink::mainThreadIsolate()->MemoryPressureNotification(
2245 v8_memory_pressure_level); 2233 v8_memory_pressure_level);
2246 blink::MemoryPressureNotificationToWorkerThreadIsolates( 2234 blink::MemoryPressureNotificationToWorkerThreadIsolates(
2247 v8_memory_pressure_level); 2235 v8_memory_pressure_level);
2248 } 2236 }
2249 2237
2250 } // namespace content 2238 } // namespace content
OLDNEW
« no previous file with comments | « content/public/common/content_switches.cc ('k') | content/test/blink_test_environment.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698