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

Unified Diff: chrome/browser/ui/webui/tracing_ui.cc

Issue 10154004: re-use WebUIs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix reload DCHECKs Created 8 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/webui/tracing_ui.cc
diff --git a/chrome/browser/ui/webui/tracing_ui.cc b/chrome/browser/ui/webui/tracing_ui.cc
index dce1f4ad514580df6236eed9e95ed2259008a8fa..25e33e450c9e9f7eb033ca67e2e8529924acb689 100644
--- a/chrome/browser/ui/webui/tracing_ui.cc
+++ b/chrome/browser/ui/webui/tracing_ui.cc
@@ -117,6 +117,8 @@ class TracingMessageHandler
// True while system tracing is active.
bool system_trace_in_progress_;
Dan Beam 2012/04/21 02:53:07 doc comment
+ bool observing_;
+
void OnEndSystemTracingAck(
const scoped_refptr<base::RefCountedString>& events_str_ptr);
@@ -158,7 +160,8 @@ class TaskProxy : public base::RefCountedThreadSafe<TaskProxy> {
TracingMessageHandler::TracingMessageHandler()
: select_trace_file_dialog_type_(SelectFileDialog::SELECT_NONE),
trace_enabled_(false),
- system_trace_in_progress_(false) {
+ system_trace_in_progress_(false),
+ observing_(true) {
stuartmorgan 2012/04/24 09:12:20 Same issue here.
Evan Stade 2012/04/24 17:52:40 Done.
}
TracingMessageHandler::~TracingMessageHandler() {
@@ -208,7 +211,9 @@ void TracingMessageHandler::OnTracingControllerInitialized(
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
// Watch for changes in GPUInfo
- GpuDataManager::GetInstance()->AddObserver(this);
+ if (!observing_)
+ GpuDataManager::GetInstance()->AddObserver(this);
+ observing_ = true;
// Tell GpuDataManager it should have full GpuInfo. If the
// Gpu process has not run yet, this will trigger its launch.

Powered by Google App Engine
This is Rietveld 408576698