Chromium Code Reviews| Index: chrome/browser/metrics/desktop_session/desktop_session_service.h |
| diff --git a/chrome/browser/metrics/desktop_engagement/desktop_engagement_service.h b/chrome/browser/metrics/desktop_session/desktop_session_service.h |
| similarity index 65% |
| rename from chrome/browser/metrics/desktop_engagement/desktop_engagement_service.h |
| rename to chrome/browser/metrics/desktop_session/desktop_session_service.h |
| index 789acec9300c0937d864059bd896f3b52757fe31..f5ca05ec2cf72687201edfa3d9494aeb0a0ea2a1 100644 |
| --- a/chrome/browser/metrics/desktop_engagement/desktop_engagement_service.h |
| +++ b/chrome/browser/metrics/desktop_session/desktop_session_service.h |
| @@ -2,31 +2,31 @@ |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| -#ifndef CHROME_BROWSER_METRICS_DESKTOP_ENGAGEMENT_DESKTOP_ENGAGEMENT_SERVICE_H_ |
| -#define CHROME_BROWSER_METRICS_DESKTOP_ENGAGEMENT_DESKTOP_ENGAGEMENT_SERVICE_H_ |
| +#ifndef CHROME_BROWSER_METRICS_DESKTOP_SESSION_DESKTOP_SESSION_SERVICE_H_ |
| +#define CHROME_BROWSER_METRICS_DESKTOP_SESSION_DESKTOP_SESSION_SERVICE_H_ |
| #include "base/macros.h" |
| #include "base/memory/weak_ptr.h" |
| #include "base/time/time.h" |
| #include "base/timer/timer.h" |
| -#include "chrome/browser/metrics/desktop_engagement/audible_contents_tracker.h" |
| -#include "chrome/browser/metrics/desktop_engagement/chrome_visibility_observer.h" |
| +#include "chrome/browser/metrics/desktop_session/audible_contents_tracker.h" |
| +#include "chrome/browser/metrics/desktop_session/chrome_visibility_observer.h" |
| namespace metrics { |
| -// Class for tracking and recording user engagement based on browser visibility, |
| -// audio and user interaction. |
| -class DesktopEngagementService : public AudibleContentsTracker::Observer { |
| +// Class for tracking and recording session length on desktop based on browser |
| +// visibility, audio and user interaction. |
| +class DesktopSessionService : public AudibleContentsTracker::Observer { |
|
sky
2016/09/14 00:00:12
This name is easily confused with session restore.
|
| public: |
| - // Creates the |DesktopEngagementService| instance and initializes the |
| - // observes that notify to it. |
| + // Creates the |DesktopSessionService| instance and initializes the |
| + // observers that notify to it. |
| static void Initialize(); |
| - // Returns true if the |DesktopEngagementService| instance has been created. |
| + // Returns true if the |DesktopSessionService| instance has been created. |
| static bool IsInitialized(); |
| - // Returns the |DesktopEngagementService| instance. |
| - static DesktopEngagementService* Get(); |
| + // Returns the |DesktopSessionService| instance. |
| + static DesktopSessionService* Get(); |
| // Called when user interaction with the browser is caught. |
| void OnUserEvent(); |
| @@ -43,8 +43,8 @@ class DesktopEngagementService : public AudibleContentsTracker::Observer { |
| } |
| protected: |
| - DesktopEngagementService(); |
| - ~DesktopEngagementService() override; |
| + DesktopSessionService(); |
| + ~DesktopSessionService() override; |
| // AudibleContentsTracker::Observer |
| void OnAudioStart() override; |
| @@ -87,11 +87,11 @@ class DesktopEngagementService : public AudibleContentsTracker::Observer { |
| ChromeVisibilityObserver visibility_observer_; |
| AudibleContentsTracker audio_tracker_; |
| - base::WeakPtrFactory<DesktopEngagementService> weak_factory_; |
| + base::WeakPtrFactory<DesktopSessionService> weak_factory_; |
| - DISALLOW_COPY_AND_ASSIGN(DesktopEngagementService); |
| + DISALLOW_COPY_AND_ASSIGN(DesktopSessionService); |
| }; |
| } // namespace metrics |
| -#endif // CHROME_BROWSER_METRICS_DESKTOP_ENGAGEMENT_DESKTOP_ENGAGEMENT_SERVICE_H_ |
| +#endif // CHROME_BROWSER_METRICS_DESKTOP_SESSION_DESKTOP_SESSION_SERVICE_H_ |