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

Side by Side Diff: chrome/browser/ui/webui/tracing_ui.cc

Issue 10874054: Add WARN_UNUSED_RESULT to scoped_refptr::release. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Don't assign NULL to pointer to scoped_refptr. Created 8 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
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 "chrome/browser/ui/webui/tracing_ui.h" 5 #include "chrome/browser/ui/webui/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 329 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 base::Bind(&ReadTraceFileCallback, 340 base::Bind(&ReadTraceFileCallback,
341 make_scoped_refptr(new TaskProxy(AsWeakPtr())), path)); 341 make_scoped_refptr(new TaskProxy(AsWeakPtr())), path));
342 } else { 342 } else {
343 BrowserThread::PostTask( 343 BrowserThread::PostTask(
344 BrowserThread::FILE, FROM_HERE, 344 BrowserThread::FILE, FROM_HERE,
345 base::Bind(&WriteTraceFileCallback, 345 base::Bind(&WriteTraceFileCallback,
346 make_scoped_refptr(new TaskProxy(AsWeakPtr())), path, 346 make_scoped_refptr(new TaskProxy(AsWeakPtr())), path,
347 trace_data_to_save_.release())); 347 trace_data_to_save_.release()));
348 } 348 }
349 349
350 select_trace_file_dialog_.release(); 350 select_trace_file_dialog_ = NULL;
351 } 351 }
352 352
353 void TracingMessageHandler::FileSelectionCanceled(void* params) { 353 void TracingMessageHandler::FileSelectionCanceled(void* params) {
354 select_trace_file_dialog_.release(); 354 select_trace_file_dialog_ = NULL;
355 if (select_trace_file_dialog_type_ == 355 if (select_trace_file_dialog_type_ ==
356 ui::SelectFileDialog::SELECT_OPEN_FILE) { 356 ui::SelectFileDialog::SELECT_OPEN_FILE) {
357 web_ui()->CallJavascriptFunction( 357 web_ui()->CallJavascriptFunction(
358 "tracingController.onLoadTraceFileCanceled"); 358 "tracingController.onLoadTraceFileCanceled");
359 } else { 359 } else {
360 web_ui()->CallJavascriptFunction( 360 web_ui()->CallJavascriptFunction(
361 "tracingController.onSaveTraceFileCanceled"); 361 "tracingController.onSaveTraceFileCanceled");
362 } 362 }
363 } 363 }
364 364
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
542 // 542 //
543 //////////////////////////////////////////////////////////////////////////////// 543 ////////////////////////////////////////////////////////////////////////////////
544 544
545 TracingUI::TracingUI(content::WebUI* web_ui) : WebUIController(web_ui) { 545 TracingUI::TracingUI(content::WebUI* web_ui) : WebUIController(web_ui) {
546 web_ui->AddMessageHandler(new TracingMessageHandler()); 546 web_ui->AddMessageHandler(new TracingMessageHandler());
547 547
548 // Set up the chrome://tracing/ source. 548 // Set up the chrome://tracing/ source.
549 Profile* profile = Profile::FromWebUI(web_ui); 549 Profile* profile = Profile::FromWebUI(web_ui);
550 ChromeURLDataManager::AddDataSource(profile, CreateTracingHTMLSource()); 550 ChromeURLDataManager::AddDataSource(profile, CreateTracingHTMLSource());
551 } 551 }
OLDNEW
« no previous file with comments | « chrome/browser/sync/glue/browser_thread_model_worker_unittest.cc ('k') | chrome/service/cloud_print/cloud_print_connector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698