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.
5 #include "chrome/browser/metrics/windowed_incognito_observer.h"
7 #include "chrome/browser/profiles/profile.h"
8 #include "chrome/browser/ui/browser.h"
9 #include "chrome/browser/ui/browser_list.h"
13 WindowedIncognitoObserver::WindowedIncognitoObserver()
14 : incognito_launched_(false) {
15 BrowserList::AddObserver(this);
18 WindowedIncognitoObserver::~WindowedIncognitoObserver() {
19 BrowserList::RemoveObserver(this);
22 void WindowedIncognitoObserver::OnBrowserAdded(Browser
* browser
) {
23 if (browser
->profile()->IsOffTheRecord())
24 incognito_launched_
= true;
27 } // namespace metrics