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

Side by Side Diff: chrome/installer/util/beacons.h

Issue 1878313003: Convert //chrome/installer from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revert decompress.cc in mini_installer. Created 4 years, 8 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
« no previous file with comments | « chrome/installer/setup/uninstall.cc ('k') | chrome/installer/util/beacons.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_INSTALLER_UTIL_BEACONS_H_ 5 #ifndef CHROME_INSTALLER_UTIL_BEACONS_H_
6 #define CHROME_INSTALLER_UTIL_BEACONS_H_ 6 #define CHROME_INSTALLER_UTIL_BEACONS_H_
7 7
8 #include <windows.h> 8 #include <windows.h>
9 9
10 #include <memory>
11
10 #include "base/macros.h" 12 #include "base/macros.h"
11 #include "base/memory/scoped_ptr.h"
12 #include "base/strings/string16.h" 13 #include "base/strings/string16.h"
13 #include "base/strings/string_piece.h" 14 #include "base/strings/string_piece.h"
14 #include "base/time/time.h" 15 #include "base/time/time.h"
15 #include "chrome/installer/util/shell_util.h" 16 #include "chrome/installer/util/shell_util.h"
16 17
17 class AppRegistrationData; 18 class AppRegistrationData;
18 class BrowserDistribution; 19 class BrowserDistribution;
19 20
20 namespace base { 21 namespace base {
21 class FilePath; 22 class FilePath;
(...skipping 11 matching lines...) Expand all
33 34
34 // Updates the last OS upgrade beacon for the install. 35 // Updates the last OS upgrade beacon for the install.
35 void UpdateOsUpgradeBeacon(bool system_install, 36 void UpdateOsUpgradeBeacon(bool system_install,
36 BrowserDistribution* distribution); 37 BrowserDistribution* distribution);
37 38
38 namespace installer_util { 39 namespace installer_util {
39 40
40 class Beacon; 41 class Beacon;
41 42
42 // Returns a Beacon representing the last time the machine's OS was ugpraded. 43 // Returns a Beacon representing the last time the machine's OS was ugpraded.
43 scoped_ptr<Beacon> MakeLastOsUpgradeBeacon( 44 std::unique_ptr<Beacon> MakeLastOsUpgradeBeacon(
44 bool system_install, 45 bool system_install,
45 const AppRegistrationData& registration_data); 46 const AppRegistrationData& registration_data);
46 47
47 // Returns a Beacon representing the last time Chrome was the user's default 48 // Returns a Beacon representing the last time Chrome was the user's default
48 // browser. 49 // browser.
49 scoped_ptr<Beacon> MakeLastWasDefaultBeacon( 50 std::unique_ptr<Beacon> MakeLastWasDefaultBeacon(
50 bool system_install, 51 bool system_install,
51 const AppRegistrationData& registration_data); 52 const AppRegistrationData& registration_data);
52 53
53 // Returns a Beacon representing the first time Chrome was not the user's 54 // Returns a Beacon representing the first time Chrome was not the user's
54 // default browser. 55 // default browser.
55 scoped_ptr<Beacon> MakeFirstNotDefaultBeacon( 56 std::unique_ptr<Beacon> MakeFirstNotDefaultBeacon(
56 bool system_install, 57 bool system_install,
57 const AppRegistrationData& registration_data); 58 const AppRegistrationData& registration_data);
58 59
59 // A named beacon stored in the registry representing the first or last time at 60 // A named beacon stored in the registry representing the first or last time at
60 // which some event took place. A beacon may apply to a per-user event or a 61 // which some event took place. A beacon may apply to a per-user event or a
61 // per-install event. In general, beacons should be created via factory methods 62 // per-install event. In general, beacons should be created via factory methods
62 // such as those above. 63 // such as those above.
63 class Beacon { 64 class Beacon {
64 public: 65 public:
65 enum class BeaconType { 66 enum class BeaconType {
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 118
118 // The name of the registry value holding the beacon. 119 // The name of the registry value holding the beacon.
119 base::string16 value_name_; 120 base::string16 value_name_;
120 121
121 DISALLOW_COPY_AND_ASSIGN(Beacon); 122 DISALLOW_COPY_AND_ASSIGN(Beacon);
122 }; 123 };
123 124
124 } // namespace installer_util 125 } // namespace installer_util
125 126
126 #endif // CHROME_INSTALLER_UTIL_BEACONS_H_ 127 #endif // CHROME_INSTALLER_UTIL_BEACONS_H_
OLDNEW
« no previous file with comments | « chrome/installer/setup/uninstall.cc ('k') | chrome/installer/util/beacons.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698