summaryrefslogtreecommitdiffstats
path: root/chrome/browser/google/did_run_updater_win.h
blob: 5fb8a6eb905e0c0a1ee51d26aa871f7c1e761342 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef CHROME_BROWSER_GOOGLE_DID_RUN_UPDATER_WIN_H_
#define CHROME_BROWSER_GOOGLE_DID_RUN_UPDATER_WIN_H_

#include "base/macros.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"

// Updates Chrome's "did run" state periodically when the process is in use.
// The creation of renderers is used as a proxy for "is the browser in use."
class DidRunUpdater : public content::NotificationObserver {
 public:
  DidRunUpdater();
  ~DidRunUpdater() override;

 private:
  // content::NotificationObserver:
  void Observe(int type,
               const content::NotificationSource& source,
               const content::NotificationDetails& details) override;

  // True if the process is running from a system-level installation.
  bool system_level_;
  content::NotificationRegistrar registrar_;

  DISALLOW_COPY_AND_ASSIGN(DidRunUpdater);
};

#endif  // CHROME_BROWSER_GOOGLE_DID_RUN_UPDATER_WIN_H_