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

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

Issue 1218583002: metrics: Add dbus interface for GetRandomPerfOutput (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed remaining comments Created 5 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_METRICS_WINDOWED_INCOGNITO_OBSERVER_H_
6 #define CHROME_BROWSER_METRICS_WINDOWED_INCOGNITO_OBSERVER_H_
7
8 #include "chrome/browser/ui/browser_list_observer.h"
9
10 class Browser;
11
12 namespace metrics {
13
14 // This class must be created and used on the UI thread. It watches for any
Ilya Sherman 2015/07/02 00:40:16 nit: I'd omit the sentence about being used on the
Simon Que 2015/07/02 18:53:02 Done.
15 // incognito window being opened from the time it is instantiated to the time it
16 // is destroyed.
17 class WindowedIncognitoObserver : public chrome::BrowserListObserver {
18 public:
19 WindowedIncognitoObserver();
20 virtual ~WindowedIncognitoObserver() override;
21
22 // This method can be checked to see whether any incognito window has been
23 // opened since the time this object was created.
24 bool incognito_launched() const {
25 return incognito_launched_;
26 }
27
28 protected:
29 // Gets set if an incognito window was opened during the lifetime of the
30 // object. Closing the window does not clear the flag.
31 bool incognito_launched_;
Ilya Sherman 2015/07/02 00:40:16 Class members should always be private (outside of
Simon Que 2015/07/02 18:53:02 Done.
32
33 private:
34 // chrome::BrowserListObserver implementation.
35 void OnBrowserAdded(Browser* browser) override;
36 };
Ilya Sherman 2015/07/02 00:40:16 nit: DISALLOW_COPY_AND_ASSIGN
Simon Que 2015/07/02 18:53:02 Done.
37
38 } // namespace metrics
39
40 #endif // CHROME_BROWSER_METRICS_WINDOWED_INCOGNITO_OBSERVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698