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

Side by Side Diff: chrome/browser/google/google_update_win.h

Issue 636283006: Record histograms for on-demand update check results. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2171
Patch Set: Created 6 years, 2 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 | « no previous file | chrome/browser/google/google_update_win.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_BROWSER_GOOGLE_GOOGLE_UPDATE_WIN_H_ 5 #ifndef CHROME_BROWSER_GOOGLE_GOOGLE_UPDATE_WIN_H_
6 #define CHROME_BROWSER_GOOGLE_GOOGLE_UPDATE_WIN_H_ 6 #define CHROME_BROWSER_GOOGLE_GOOGLE_UPDATE_WIN_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/strings/string16.h" 10 #include "base/strings/string16.h"
11 #include "google_update/google_update_idl.h" 11 #include "google_update/google_update_idl.h"
12 12
13 namespace base { 13 namespace base {
14 class MessageLoop; 14 class MessageLoop;
15 } 15 }
16 16
17 namespace views { 17 namespace views {
18 class Widget; 18 class Widget;
19 } 19 }
20 20
21 // The status of the upgrade. UPGRADE_STARTED and UPGRADE_CHECK_STARTED are 21 // The status of the upgrade. UPGRADE_STARTED and UPGRADE_CHECK_STARTED are
22 // internal states and will not be reported as results to the listener. 22 // internal states and will not be reported as results to the listener.
23 // These values are used for a histogram. Do not reorder.
23 enum GoogleUpdateUpgradeResult { 24 enum GoogleUpdateUpgradeResult {
24 // The upgrade has started. 25 // The upgrade has started.
25 UPGRADE_STARTED = 0, 26 UPGRADE_STARTED = 0,
26 // A check for upgrade has been initiated. 27 // A check for upgrade has been initiated.
27 UPGRADE_CHECK_STARTED, 28 UPGRADE_CHECK_STARTED = 1,
28 // An update is available. 29 // An update is available.
29 UPGRADE_IS_AVAILABLE, 30 UPGRADE_IS_AVAILABLE = 2,
30 // The upgrade happened successfully. 31 // The upgrade happened successfully.
31 UPGRADE_SUCCESSFUL, 32 UPGRADE_SUCCESSFUL = 3,
32 // No need to upgrade, Chrome is up to date. 33 // No need to upgrade, Chrome is up to date.
33 UPGRADE_ALREADY_UP_TO_DATE, 34 UPGRADE_ALREADY_UP_TO_DATE = 4,
34 // An error occurred. 35 // An error occurred.
35 UPGRADE_ERROR, 36 UPGRADE_ERROR = 5,
37 NUM_UPGRADE_RESULTS
36 }; 38 };
37 39
40 // These values are used for a histogram. Do not reorder.
38 enum GoogleUpdateErrorCode { 41 enum GoogleUpdateErrorCode {
39 // The upgrade completed successfully (or hasn't been started yet). 42 // The upgrade completed successfully (or hasn't been started yet).
40 GOOGLE_UPDATE_NO_ERROR = 0, 43 GOOGLE_UPDATE_NO_ERROR = 0,
41 // Google Update only supports upgrading if Chrome is installed in the default 44 // Google Update only supports upgrading if Chrome is installed in the default
42 // location. This error will appear for developer builds and with 45 // location. This error will appear for developer builds and with
43 // installations unzipped to random locations. 46 // installations unzipped to random locations.
44 CANNOT_UPGRADE_CHROME_IN_THIS_DIRECTORY, 47 CANNOT_UPGRADE_CHROME_IN_THIS_DIRECTORY = 1,
45 // Failed to create Google Update JobServer COM class. 48 // Failed to create Google Update JobServer COM class.
46 GOOGLE_UPDATE_JOB_SERVER_CREATION_FAILED, 49 GOOGLE_UPDATE_JOB_SERVER_CREATION_FAILED = 2,
47 // Failed to create Google Update OnDemand COM class. 50 // Failed to create Google Update OnDemand COM class.
48 GOOGLE_UPDATE_ONDEMAND_CLASS_NOT_FOUND, 51 GOOGLE_UPDATE_ONDEMAND_CLASS_NOT_FOUND = 3,
49 // Google Update OnDemand COM class reported an error during a check for 52 // Google Update OnDemand COM class reported an error during a check for
50 // update (or while upgrading). 53 // update (or while upgrading).
51 GOOGLE_UPDATE_ONDEMAND_CLASS_REPORTED_ERROR, 54 GOOGLE_UPDATE_ONDEMAND_CLASS_REPORTED_ERROR = 4,
52 // A call to GetResults failed. 55 // A call to GetResults failed.
53 GOOGLE_UPDATE_GET_RESULT_CALL_FAILED, 56 GOOGLE_UPDATE_GET_RESULT_CALL_FAILED = 5,
54 // A call to GetVersionInfo failed. 57 // A call to GetVersionInfo failed.
55 GOOGLE_UPDATE_GET_VERSION_INFO_FAILED, 58 GOOGLE_UPDATE_GET_VERSION_INFO_FAILED = 6,
56 // An error occurred while upgrading (or while checking for update). 59 // An error occurred while upgrading (or while checking for update).
57 // Check the Google Update log in %TEMP% for more details. 60 // Check the Google Update log in %TEMP% for more details.
58 GOOGLE_UPDATE_ERROR_UPDATING, 61 GOOGLE_UPDATE_ERROR_UPDATING = 7,
59 // Updates can not be downloaded because the administrator has disabled all 62 // Updates can not be downloaded because the administrator has disabled all
60 // types of updating. 63 // types of updating.
61 GOOGLE_UPDATE_DISABLED_BY_POLICY, 64 GOOGLE_UPDATE_DISABLED_BY_POLICY = 8,
62 // Updates can not be downloaded because the administrator has disabled 65 // Updates can not be downloaded because the administrator has disabled
63 // manual (on-demand) updates. Automatic background updates are allowed. 66 // manual (on-demand) updates. Automatic background updates are allowed.
64 GOOGLE_UPDATE_DISABLED_BY_POLICY_AUTO_ONLY, 67 GOOGLE_UPDATE_DISABLED_BY_POLICY_AUTO_ONLY = 9,
68 NUM_ERROR_CODES
65 }; 69 };
66 70
67 // The GoogleUpdateStatusListener interface is used by components to receive 71 // The GoogleUpdateStatusListener interface is used by components to receive
68 // notifications about the results of an Google Update operation. 72 // notifications about the results of an Google Update operation.
69 class GoogleUpdateStatusListener { 73 class GoogleUpdateStatusListener {
70 public: 74 public:
71 // This function is called when Google Update has finished its operation and 75 // This function is called when Google Update has finished its operation and
72 // wants to notify us about the results. |results| represents what the end 76 // wants to notify us about the results. |results| represents what the end
73 // state is, |error_code| represents what error occurred, |error_message| is a 77 // state is, |error_code| represents what error occurred, |error_message| is a
74 // string version of the same (might be blank) and |version| specifies what 78 // string version of the same (might be blank) and |version| specifies what
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 // Otherwise, this will be blank. 142 // Otherwise, this will be blank.
139 base::string16 version_available_; 143 base::string16 version_available_;
140 144
141 // The listener who is interested in finding out the result of the operation. 145 // The listener who is interested in finding out the result of the operation.
142 GoogleUpdateStatusListener* listener_; 146 GoogleUpdateStatusListener* listener_;
143 147
144 DISALLOW_COPY_AND_ASSIGN(GoogleUpdate); 148 DISALLOW_COPY_AND_ASSIGN(GoogleUpdate);
145 }; 149 };
146 150
147 #endif // CHROME_BROWSER_GOOGLE_GOOGLE_UPDATE_WIN_H_ 151 #endif // CHROME_BROWSER_GOOGLE_GOOGLE_UPDATE_WIN_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/google/google_update_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698