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

Side by Side Diff: chrome/browser/metrics/tracking_synchronizer.cc

Issue 8775061: Support incremental-max and sample in Profiler data (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/metrics/tracking_synchronizer.h" 5 #include "chrome/browser/metrics/tracking_synchronizer.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/json/json_reader.h" 8 #include "base/json/json_reader.h"
9 #include "base/json/json_writer.h" 9 #include "base/json/json_writer.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 continue; 186 continue;
187 187
188 ++request->processes_pending_; 188 ++request->processes_pending_;
189 if (!render_process_host->Send( 189 if (!render_process_host->Send(
190 new ChromeViewMsg_GetRendererTrackedData(sequence_number))) { 190 new ChromeViewMsg_GetRendererTrackedData(sequence_number))) {
191 DecrementPendingProcesses(sequence_number); 191 DecrementPendingProcesses(sequence_number);
192 } 192 }
193 } 193 }
194 194
195 // Get the ThreadData for the browser process and send it back. 195 // Get the ThreadData for the browser process and send it back.
196 base::DictionaryValue* value = tracked_objects::ThreadData::ToValue(); 196 base::DictionaryValue* value = tracked_objects::ThreadData::ToValue(false);
197 const std::string process_type = 197 const std::string process_type =
198 content::GetProcessTypeNameInEnglish(content::PROCESS_TYPE_BROWSER); 198 content::GetProcessTypeNameInEnglish(content::PROCESS_TYPE_BROWSER);
199 value->SetString("process_type", process_type); 199 value->SetString("process_type", process_type);
200 value->SetInteger("process_id", base::GetCurrentProcId()); 200 value->SetInteger("process_id", base::GetCurrentProcId());
201 DCHECK_GT(request->processes_pending_, 0); 201 DCHECK_GT(request->processes_pending_, 0);
202 DecrementPendingProcessesAndSendData(sequence_number, value); 202 DecrementPendingProcessesAndSendData(sequence_number, value);
203 203
204 return sequence_number; 204 return sequence_number;
205 } 205 }
206 206
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 // Watch out for wrapping to a negative number. 266 // Watch out for wrapping to a negative number.
267 if (last_used_sequence_number_ < 0) 267 if (last_used_sequence_number_ < 0)
268 last_used_sequence_number_ = 1; 268 last_used_sequence_number_ = 1;
269 return last_used_sequence_number_; 269 return last_used_sequence_number_;
270 } 270 }
271 271
272 // static 272 // static
273 TrackingSynchronizer* TrackingSynchronizer::tracking_synchronizer_ = NULL; 273 TrackingSynchronizer* TrackingSynchronizer::tracking_synchronizer_ = NULL;
274 274
275 } // namespace chrome_browser_metrics 275 } // namespace chrome_browser_metrics
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698