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

Side by Side Diff: content/browser/tracing/tracing_ui.cc

Issue 12150004: Category group support/Renamings. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Added destructor for CategoryFilter class per CQ failure. Created 7 years, 8 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/tracing/tracing_ui.h" 5 #include "content/browser/tracing/tracing_ui.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after
489 489
490 void TracingMessageHandler::OnTraceBufferPercentFullReply(float percent_full) { 490 void TracingMessageHandler::OnTraceBufferPercentFullReply(float percent_full) {
491 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 491 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
492 web_ui()->CallJavascriptFunction( 492 web_ui()->CallJavascriptFunction(
493 "tracingController.onRequestBufferPercentFullComplete", 493 "tracingController.onRequestBufferPercentFullComplete",
494 *scoped_ptr<base::Value>(new base::FundamentalValue(percent_full))); 494 *scoped_ptr<base::Value>(new base::FundamentalValue(percent_full)));
495 } 495 }
496 496
497 void TracingMessageHandler::OnGetKnownCategories(const base::ListValue* list) { 497 void TracingMessageHandler::OnGetKnownCategories(const base::ListValue* list) {
498 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 498 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
499 if (!TraceController::GetInstance()->GetKnownCategoriesAsync(this)) { 499 if (!TraceController::GetInstance()->GetKnownCategoryGroupsAsync(this)) {
500 std::set<std::string> ret; 500 std::set<std::string> ret;
501 OnKnownCategoriesCollected(ret); 501 OnKnownCategoriesCollected(ret);
502 } 502 }
503 } 503 }
504 504
505 void TracingMessageHandler::OnKnownCategoriesCollected( 505 void TracingMessageHandler::OnKnownCategoriesCollected(
506 const std::set<std::string>& known_categories) { 506 const std::set<std::string>& known_categories) {
507 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 507 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
508 508
509 scoped_ptr<base::ListValue> categories(new base::ListValue()); 509 scoped_ptr<base::ListValue> categories(new base::ListValue());
(...skipping 19 matching lines...) Expand all
529 TracingUI::TracingUI(WebUI* web_ui) : WebUIController(web_ui) { 529 TracingUI::TracingUI(WebUI* web_ui) : WebUIController(web_ui) {
530 web_ui->AddMessageHandler(new TracingMessageHandler()); 530 web_ui->AddMessageHandler(new TracingMessageHandler());
531 531
532 // Set up the chrome://tracing/ source. 532 // Set up the chrome://tracing/ source.
533 BrowserContext* browser_context = 533 BrowserContext* browser_context =
534 web_ui->GetWebContents()->GetBrowserContext(); 534 web_ui->GetWebContents()->GetBrowserContext();
535 WebUIDataSource::Add(browser_context, CreateTracingHTMLSource()); 535 WebUIDataSource::Add(browser_context, CreateTracingHTMLSource());
536 } 536 }
537 537
538 } // namespace content 538 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/tracing/trace_message_filter.cc ('k') | content/public/browser/trace_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698