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

Side by Side Diff: content/browser/devtools/devtools_tracing_handler.cc

Issue 567943002: Refactoring the weak_ptr_factory order content/browser folder (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Resolving swarming errors Created 6 years, 3 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 (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/browser/devtools/devtools_tracing_handler.h" 5 #include "content/browser/devtools/devtools_tracing_handler.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/debug/trace_event_impl.h" 10 #include "base/debug/trace_event_impl.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 49
50 } // namespace 50 } // namespace
51 51
52 const char* DevToolsTracingHandler::kDefaultCategories = 52 const char* DevToolsTracingHandler::kDefaultCategories =
53 "-*,disabled-by-default-devtools.timeline*"; 53 "-*,disabled-by-default-devtools.timeline*";
54 const double DevToolsTracingHandler::kDefaultReportingInterval = 1000.0; 54 const double DevToolsTracingHandler::kDefaultReportingInterval = 1000.0;
55 const double DevToolsTracingHandler::kMinimumReportingInterval = 250.0; 55 const double DevToolsTracingHandler::kMinimumReportingInterval = 250.0;
56 56
57 DevToolsTracingHandler::DevToolsTracingHandler( 57 DevToolsTracingHandler::DevToolsTracingHandler(
58 DevToolsTracingHandler::Target target) 58 DevToolsTracingHandler::Target target)
59 : weak_factory_(this), target_(target), is_recording_(false) { 59 : target_(target), is_recording_(false), weak_factory_(this) {
60 RegisterCommandHandler(devtools::Tracing::start::kName, 60 RegisterCommandHandler(devtools::Tracing::start::kName,
61 base::Bind(&DevToolsTracingHandler::OnStart, 61 base::Bind(&DevToolsTracingHandler::OnStart,
62 base::Unretained(this))); 62 base::Unretained(this)));
63 RegisterCommandHandler(devtools::Tracing::end::kName, 63 RegisterCommandHandler(devtools::Tracing::end::kName,
64 base::Bind(&DevToolsTracingHandler::OnEnd, 64 base::Bind(&DevToolsTracingHandler::OnEnd,
65 base::Unretained(this))); 65 base::Unretained(this)));
66 RegisterCommandHandler(devtools::Tracing::getCategories::kName, 66 RegisterCommandHandler(devtools::Tracing::getCategories::kName,
67 base::Bind(&DevToolsTracingHandler::OnGetCategories, 67 base::Bind(&DevToolsTracingHandler::OnGetCategories,
68 base::Unretained(this))); 68 base::Unretained(this)));
69 } 69 }
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 it != category_set.end(); ++it) { 232 it != category_set.end(); ++it) {
233 category_list->AppendString(*it); 233 category_list->AppendString(*it);
234 } 234 }
235 235
236 response->Set(devtools::Tracing::getCategories::kResponseCategories, 236 response->Set(devtools::Tracing::getCategories::kResponseCategories,
237 category_list); 237 category_list);
238 SendAsyncResponse(command->SuccessResponse(response)); 238 SendAsyncResponse(command->SuccessResponse(response));
239 } 239 }
240 240
241 } // namespace content 241 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/devtools/devtools_tracing_handler.h ('k') | content/browser/frame_host/navigation_entry_screenshot_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698