Pin Chrome's shortcut to the Win10 Start menu on install and OS upgrade.
[chromium-blink-merge.git] / chrome / browser / metrics / windowed_incognito_observer.cc
blobc4a96cfd963c7d9c0bf5361ed2749cd34b763847
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"
11 namespace metrics {
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