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

Unified Diff: chrome/browser/metrics/metrics_service.h

Issue 149343: http://codereview.chromium.org/147084... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 5 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 | « no previous file | chrome/browser/metrics/metrics_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/metrics/metrics_service.h
===================================================================
--- chrome/browser/metrics/metrics_service.h (revision 20172)
+++ chrome/browser/metrics/metrics_service.h (working copy)
@@ -22,6 +22,7 @@
#include "chrome/browser/net/url_fetcher.h"
#include "chrome/common/notification_registrar.h"
#include "webkit/glue/webplugin.h"
+#include "testing/gtest/include/gtest/gtest_prod.h"
class BookmarkModel;
class BookmarkNode;
@@ -160,6 +161,12 @@
// Generates a new client ID to use to identify self to metrics server.
static std::string GenerateClientID();
+#if defined(OS_POSIX)
+ // Generates a new client ID to use to identify self to metrics server,
+ // given 128 bits of randomness.
+ static std::string RandomBytesToGUIDString(const uint64 bytes[2]);
+#endif
+
// Schedule the next save of LocalState information. This is called
// automatically by the task that performs each save to schedule the next one.
void ScheduleNextStateSave();
@@ -475,6 +482,9 @@
// Indicate that a timer for sending the next log has already been queued.
bool timer_pending_;
+ FRIEND_TEST(MetricsServiceTest, ClientIdGeneratesAllZeroes);
+ FRIEND_TEST(MetricsServiceTest, ClientIdGeneratesCorrectly);
+ FRIEND_TEST(MetricsServiceTest, ClientIdCorrectlyFormatted);
DISALLOW_COPY_AND_ASSIGN(MetricsService);
};
« no previous file with comments | « no previous file | chrome/browser/metrics/metrics_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698