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

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

Issue 365133005: Refactor SetClientID such that metrics rather than crash backs up the client id in Google Update set (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cleanup Created 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #ifndef CHROME_BROWSER_METRICS_CHROME_METRICS_SERVICE_CLIENT_H_ 5 #ifndef CHROME_BROWSER_METRICS_CHROME_METRICS_SERVICE_CLIENT_H_
6 #define CHROME_BROWSER_METRICS_CHROME_METRICS_SERVICE_CLIENT_H_ 6 #define CHROME_BROWSER_METRICS_CHROME_METRICS_SERVICE_CLIENT_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 44
45 // Factory function. 45 // Factory function.
46 static scoped_ptr<ChromeMetricsServiceClient> Create( 46 static scoped_ptr<ChromeMetricsServiceClient> Create(
47 metrics::MetricsStateManager* state_manager, 47 metrics::MetricsStateManager* state_manager,
48 PrefService* local_state); 48 PrefService* local_state);
49 49
50 // Registers local state prefs used by this class. 50 // Registers local state prefs used by this class.
51 static void RegisterPrefs(PrefRegistrySimple* registry); 51 static void RegisterPrefs(PrefRegistrySimple* registry);
52 52
53 // metrics::MetricsServiceClient: 53 // metrics::MetricsServiceClient:
54 virtual void SetClientID(const std::string& client_id) OVERRIDE; 54 virtual void RegisterClientID(const std::string& client_id) OVERRIDE;
55 virtual bool IsOffTheRecordSessionActive() OVERRIDE; 55 virtual bool IsOffTheRecordSessionActive() OVERRIDE;
56 virtual std::string GetApplicationLocale() OVERRIDE; 56 virtual std::string GetApplicationLocale() OVERRIDE;
57 virtual bool GetBrand(std::string* brand_code) OVERRIDE; 57 virtual bool GetBrand(std::string* brand_code) OVERRIDE;
58 virtual metrics::SystemProfileProto::Channel GetChannel() OVERRIDE; 58 virtual metrics::SystemProfileProto::Channel GetChannel() OVERRIDE;
59 virtual std::string GetVersionString() OVERRIDE; 59 virtual std::string GetVersionString() OVERRIDE;
60 virtual int64 GetInstallDate() OVERRIDE; 60 virtual int64 GetInstallDate() OVERRIDE;
61 virtual void OnLogUploadComplete() OVERRIDE; 61 virtual void OnLogUploadComplete() OVERRIDE;
62 virtual void StartGatheringMetrics( 62 virtual void StartGatheringMetrics(
63 const base::Closure& done_callback) OVERRIDE; 63 const base::Closure& done_callback) OVERRIDE;
64 virtual void CollectFinalMetrics(const base::Closure& done_callback) 64 virtual void CollectFinalMetrics(const base::Closure& done_callback)
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 164
165 // Callback that is called when initial metrics gathering is complete. 165 // Callback that is called when initial metrics gathering is complete.
166 base::Closure finished_gathering_initial_metrics_callback_; 166 base::Closure finished_gathering_initial_metrics_callback_;
167 167
168 base::WeakPtrFactory<ChromeMetricsServiceClient> weak_ptr_factory_; 168 base::WeakPtrFactory<ChromeMetricsServiceClient> weak_ptr_factory_;
169 169
170 DISALLOW_COPY_AND_ASSIGN(ChromeMetricsServiceClient); 170 DISALLOW_COPY_AND_ASSIGN(ChromeMetricsServiceClient);
171 }; 171 };
172 172
173 #endif // CHROME_BROWSER_METRICS_CHROME_METRICS_SERVICE_CLIENT_H_ 173 #endif // CHROME_BROWSER_METRICS_CHROME_METRICS_SERVICE_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698