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

Side by Side Diff: ios/chrome/browser/metrics/ios_chrome_metrics_service_client.h

Issue 1411593004: Eliminate //chrome dependencies from MetricsServicesManager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix official build Created 5 years, 2 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 IOS_CHROME_BROWSER_METRICS_IOS_CHROME_METRICS_SERVICE_CLIENT_H_ 5 #ifndef IOS_CHROME_BROWSER_METRICS_IOS_CHROME_METRICS_SERVICE_CLIENT_H_
6 #define IOS_CHROME_BROWSER_METRICS_IOS_CHROME_METRICS_SERVICE_CLIENT_H_ 6 #define IOS_CHROME_BROWSER_METRICS_IOS_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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 43
44 // Factory function. 44 // Factory function.
45 static scoped_ptr<IOSChromeMetricsServiceClient> Create( 45 static scoped_ptr<IOSChromeMetricsServiceClient> Create(
46 metrics::MetricsStateManager* state_manager, 46 metrics::MetricsStateManager* state_manager,
47 PrefService* local_state); 47 PrefService* local_state);
48 48
49 // Registers local state prefs used by this class. 49 // Registers local state prefs used by this class.
50 static void RegisterPrefs(PrefRegistrySimple* registry); 50 static void RegisterPrefs(PrefRegistrySimple* registry);
51 51
52 // metrics::MetricsServiceClient: 52 // metrics::MetricsServiceClient:
53 metrics::MetricsService* GetMetricsService() override;
53 void SetMetricsClientId(const std::string& client_id) override; 54 void SetMetricsClientId(const std::string& client_id) override;
54 void OnRecordingDisabled() override; 55 void OnRecordingDisabled() override;
55 bool IsOffTheRecordSessionActive() override; 56 bool IsOffTheRecordSessionActive() override;
56 int32 GetProduct() override; 57 int32 GetProduct() override;
57 std::string GetApplicationLocale() override; 58 std::string GetApplicationLocale() override;
58 bool GetBrand(std::string* brand_code) override; 59 bool GetBrand(std::string* brand_code) override;
59 metrics::SystemProfileProto::Channel GetChannel() override; 60 metrics::SystemProfileProto::Channel GetChannel() override;
60 std::string GetVersionString() override; 61 std::string GetVersionString() override;
61 void OnLogUploadComplete() override; 62 void OnLogUploadComplete() override;
62 void InitializeSystemProfileMetrics( 63 void InitializeSystemProfileMetrics(
63 const base::Closure& done_callback) override; 64 const base::Closure& done_callback) override;
64 void CollectFinalMetricsForLog(const base::Closure& done_callback) override; 65 void CollectFinalMetricsForLog(const base::Closure& done_callback) override;
65 scoped_ptr<metrics::MetricsLogUploader> CreateUploader( 66 scoped_ptr<metrics::MetricsLogUploader> CreateUploader(
66 const base::Callback<void(int)>& on_upload_complete) override; 67 const base::Callback<void(int)>& on_upload_complete) override;
67 base::TimeDelta GetStandardUploadInterval() override; 68 base::TimeDelta GetStandardUploadInterval() override;
68 base::string16 GetRegistryBackupKey() override; 69 base::string16 GetRegistryBackupKey() override;
69 70
70 // web::GlobalWebStateObserver: 71 // web::GlobalWebStateObserver:
71 void WebStateDidStartLoading(web::WebState* web_state) override; 72 void WebStateDidStartLoading(web::WebState* web_state) override;
72 void WebStateDidStopLoading(web::WebState* web_state) override; 73 void WebStateDidStopLoading(web::WebState* web_state) override;
73 74
74 metrics::MetricsService* metrics_service() { return metrics_service_.get(); }
75
76 // Records an unexpected renderer (web) process termination. 75 // Records an unexpected renderer (web) process termination.
77 // This path only exists on iOS because the other platforms use the (now 76 // This path only exists on iOS because the other platforms use the (now
78 // deprecated) content::Notification system to get this information into the 77 // deprecated) content::Notification system to get this information into the
79 // stability provider. 78 // stability provider.
80 void LogRendererProcessCrash(); 79 void LogRendererProcessCrash();
81 80
82 private: 81 private:
83 explicit IOSChromeMetricsServiceClient( 82 explicit IOSChromeMetricsServiceClient(
84 metrics::MetricsStateManager* state_manager); 83 metrics::MetricsStateManager* state_manager);
85 84
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 // Whether this client has already uploaded profiler data during this session. 158 // Whether this client has already uploaded profiler data during this session.
160 // Profiler data is uploaded at most once per session. 159 // Profiler data is uploaded at most once per session.
161 bool has_uploaded_profiler_data_; 160 bool has_uploaded_profiler_data_;
162 161
163 base::WeakPtrFactory<IOSChromeMetricsServiceClient> weak_ptr_factory_; 162 base::WeakPtrFactory<IOSChromeMetricsServiceClient> weak_ptr_factory_;
164 163
165 DISALLOW_COPY_AND_ASSIGN(IOSChromeMetricsServiceClient); 164 DISALLOW_COPY_AND_ASSIGN(IOSChromeMetricsServiceClient);
166 }; 165 };
167 166
168 #endif // IOS_CHROME_BROWSER_METRICS_IOS_CHROME_METRICS_SERVICE_CLIENT_H_ 167 #endif // IOS_CHROME_BROWSER_METRICS_IOS_CHROME_METRICS_SERVICE_CLIENT_H_
OLDNEW
« no previous file with comments | « components/metrics/test_metrics_service_client.cc ('k') | ios/chrome/browser/metrics/ios_chrome_metrics_service_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698