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

Unified Diff: chrome_frame/crash_metrics.h

Issue 2776010: Move the crash metrics to the crash reproting lib to avoid a back dependency ... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 6 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
« no previous file with comments | « chrome_frame/chrome_frame_automation.cc ('k') | chrome_frame/crash_metrics.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome_frame/crash_metrics.h
===================================================================
--- chrome_frame/crash_metrics.h (revision 49520)
+++ chrome_frame/crash_metrics.h (working copy)
@@ -1,65 +0,0 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// This file defines a service that collects information about the user
-// experience in order to help improve future versions of the app.
-
-#ifndef CHROME_FRAME_CRASH_METRICS_H_
-#define CHROME_FRAME_CRASH_METRICS_H_
-
-#include "base/basictypes.h"
-#include "base/lazy_instance.h"
-#include "base/thread_local.h"
-
-// This class provides functionality to track counters like successful page
-// loads in the host browser, total number of crashes, page loads in chrome
-// frame.
-class CrashMetricsReporter {
- public:
- enum Metric {
- NAVIGATION_COUNT,
- CRASH_COUNT,
- CHROME_FRAME_NAVIGATION_COUNT,
- SESSION_ID,
- LAST_METRIC,
- };
- // Returns the global instance of this class.
- static CrashMetricsReporter* GetInstance();
-
- // The following function pair return/set/increment the specified user
- // metrics value from the registry. These values are set under the
- // following key:-
- // HKCU\Software\\Google\\ChromeFrame\\UserMetrics
- int GetMetric(Metric metric);
- bool SetMetric(Metric metric, int value);
- int IncrementMetric(Metric metric);
-
- // Records the crash metrics counters like navigation count, crash count.
- void RecordCrashMetrics();
-
- bool active() const {
- return active_;
- }
-
- void set_active(bool active) {
- active_ = active;
- }
-
- private:
- friend struct base::DefaultLazyInstanceTraits<CrashMetricsReporter>;
-
- CrashMetricsReporter()
- : active_(false) {}
- virtual ~CrashMetricsReporter() {}
-
- // Indicates whether the crash metrics reporter instance is active.
- bool active_;
-
- static wchar_t* g_metric_names[LAST_METRIC];
-
- DISALLOW_COPY_AND_ASSIGN(CrashMetricsReporter);
-};
-
-#endif // CHROME_FRAME_CRASH_METRICS_H_
-
« no previous file with comments | « chrome_frame/chrome_frame_automation.cc ('k') | chrome_frame/crash_metrics.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698