Home | History | Annotate | Download | only in google
      1 // Copyright 2014 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_GOOGLE_DID_RUN_UPDATER_WIN_H_
      6 #define CHROME_BROWSER_GOOGLE_DID_RUN_UPDATER_WIN_H_
      7 
      8 #include "base/macros.h"
      9 #include "content/public/browser/notification_observer.h"
     10 #include "content/public/browser/notification_registrar.h"
     11 
     12 // Updates Chrome's "did run" state periodically when the process is in use.
     13 // The creation of renderers is used as a proxy for "is the browser in use."
     14 class DidRunUpdater : public content::NotificationObserver {
     15  public:
     16   DidRunUpdater();
     17   ~DidRunUpdater() override;
     18 
     19  private:
     20   // content::NotificationObserver:
     21   void Observe(int type,
     22                const content::NotificationSource& source,
     23                const content::NotificationDetails& details) override;
     24 
     25   // True if the process is running from a system-level installation.
     26   bool system_level_;
     27   content::NotificationRegistrar registrar_;
     28 
     29   DISALLOW_COPY_AND_ASSIGN(DidRunUpdater);
     30 };
     31 
     32 #endif  // CHROME_BROWSER_GOOGLE_DID_RUN_UPDATER_WIN_H_
     33