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

Side by Side Diff: chrome/browser/metrics/metrics_service.h

Issue 10917198: Switch NOTIFICATION_TAB_PARENTED to use WebContents. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 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 | Annotate | Revision Log
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 // This file defines a service that collects information about the user 5 // This file defines a service that collects information about the user
6 // experience in order to help improve future versions of the app. 6 // experience in order to help improve future versions of the app.
7 7
8 #ifndef CHROME_BROWSER_METRICS_METRICS_SERVICE_H_ 8 #ifndef CHROME_BROWSER_METRICS_METRICS_SERVICE_H_
9 #define CHROME_BROWSER_METRICS_METRICS_SERVICE_H_ 9 #define CHROME_BROWSER_METRICS_METRICS_SERVICE_H_
10 10
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 void PrepareFetchWithStagedLog(); 321 void PrepareFetchWithStagedLog();
322 322
323 // Implementation of net::URLFetcherDelegate. Called after transmission 323 // Implementation of net::URLFetcherDelegate. Called after transmission
324 // completes (either successfully or with failure). 324 // completes (either successfully or with failure).
325 virtual void OnURLFetchComplete(const net::URLFetcher* source) OVERRIDE; 325 virtual void OnURLFetchComplete(const net::URLFetcher* source) OVERRIDE;
326 326
327 // Logs debugging details, for the case where the server returns a response 327 // Logs debugging details, for the case where the server returns a response
328 // code other than 200. 328 // code other than 200.
329 void LogBadResponseCode(int response_code, bool is_xml); 329 void LogBadResponseCode(int response_code, bool is_xml);
330 330
331 // Records a window-related notification. 331 // Records a window-related notification. |window_or_tab| is either a pointer
332 void LogWindowChange(int type, 332 // to a WebContents (for a tab) or a Browser (for a window).
333 const content::NotificationSource& source, 333 void LogWindowOrTabChange(int type, uintptr_t window_or_tab);
334 const content::NotificationDetails& details);
335 334
336 // Reads, increments and then sets the specified integer preference. 335 // Reads, increments and then sets the specified integer preference.
337 void IncrementPrefValue(const char* path); 336 void IncrementPrefValue(const char* path);
338 337
339 // Reads, increments and then sets the specified long preference that is 338 // Reads, increments and then sets the specified long preference that is
340 // stored as a string. 339 // stored as a string.
341 void IncrementLongPrefsValue(const char* path); 340 void IncrementLongPrefsValue(const char* path);
342 341
343 // Records a renderer process crash. 342 // Records a renderer process crash.
344 void LogRendererCrash(content::RenderProcessHost* host, 343 void LogRendererCrash(content::RenderProcessHost* host,
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
446 // The non-identifying low entropy source value. 445 // The non-identifying low entropy source value.
447 int low_entropy_source_; 446 int low_entropy_source_;
448 447
449 // Whether the MetricsService object has received any notifications since 448 // Whether the MetricsService object has received any notifications since
450 // the last time a transmission was sent. 449 // the last time a transmission was sent.
451 bool idle_since_last_transmission_; 450 bool idle_since_last_transmission_;
452 451
453 // A number that identifies the how many times the app has been launched. 452 // A number that identifies the how many times the app has been launched.
454 int session_id_; 453 int session_id_;
455 454
456 // Maps NavigationControllers (corresponding to tabs) or Browser 455 // Maps WebContentses (corresponding to tabs) or Browsers (corresponding to
457 // (corresponding to Windows) to a unique integer that we will use to identify 456 // Windows) to a unique integer that we will use to identify them.
458 // it. |next_window_id_| is used to track which IDs we have used so far. 457 // |next_window_id_| is used to track which IDs we have used so far.
459 typedef std::map<uintptr_t, int> WindowMap; 458 typedef std::map<uintptr_t, int> WindowMap;
460 WindowMap window_map_; 459 WindowMap window_map_;
461 int next_window_id_; 460 int next_window_id_;
462 461
463 // Buffer of child process notifications for quick access. See 462 // Buffer of child process notifications for quick access. See
464 // ChildProcessStats documentation above for more details. 463 // ChildProcessStats documentation above for more details.
465 struct ChildProcessStats; 464 struct ChildProcessStats;
466 std::map<string16, ChildProcessStats> child_process_stats_buffer_; 465 std::map<string16, ChildProcessStats> child_process_stats_buffer_;
467 466
468 // Weak pointers factory used to post task on different threads. All weak 467 // Weak pointers factory used to post task on different threads. All weak
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
513 friend bool prerender::IsOmniboxEnabled(Profile* profile); 512 friend bool prerender::IsOmniboxEnabled(Profile* profile);
514 friend class extensions::ExtensionDownloader; 513 friend class extensions::ExtensionDownloader;
515 514
516 // Returns true if prefs::kMetricsReportingEnabled is set. 515 // Returns true if prefs::kMetricsReportingEnabled is set.
517 static bool IsMetricsReportingEnabled(); 516 static bool IsMetricsReportingEnabled();
518 517
519 DISALLOW_IMPLICIT_CONSTRUCTORS(MetricsServiceHelper); 518 DISALLOW_IMPLICIT_CONSTRUCTORS(MetricsServiceHelper);
520 }; 519 };
521 520
522 #endif // CHROME_BROWSER_METRICS_METRICS_SERVICE_H_ 521 #endif // CHROME_BROWSER_METRICS_METRICS_SERVICE_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_tab_id_map.cc ('k') | chrome/browser/metrics/metrics_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698