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

Side by Side Diff: chrome/browser/ui/webui/help/version_updater.h

Issue 790183002: Revert of Call to CrosSettings::Set() is replaced by OwnerSettingsService::Set() in VersionUpda... (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years 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
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_UI_WEBUI_HELP_VERSION_UPDATER_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_HELP_VERSION_UPDATER_H_
6 #define CHROME_BROWSER_UI_WEBUI_HELP_VERSION_UPDATER_H_ 6 #define CHROME_BROWSER_UI_WEBUI_HELP_VERSION_UPDATER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
11 #include "base/strings/string16.h" 11 #include "base/strings/string16.h"
12 12
13 namespace content {
14 class BrowserContext;
15 }
16
17 // Interface implemented to expose per-platform updating functionality. 13 // Interface implemented to expose per-platform updating functionality.
18 class VersionUpdater { 14 class VersionUpdater {
19 public: 15 public:
20 // Update process state machine. 16 // Update process state machine.
21 enum Status { 17 enum Status {
22 CHECKING, 18 CHECKING,
23 UPDATING, 19 UPDATING,
24 NEARLY_UPDATED, 20 NEARLY_UPDATED,
25 UPDATED, 21 UPDATED,
26 FAILED, 22 FAILED,
(...skipping 25 matching lines...) Expand all
52 48
53 #if defined(OS_MACOSX) 49 #if defined(OS_MACOSX)
54 // Used to show or hide the promote UI elements. 50 // Used to show or hide the promote UI elements.
55 typedef base::Callback<void(PromotionState)> PromoteCallback; 51 typedef base::Callback<void(PromotionState)> PromoteCallback;
56 #endif 52 #endif
57 53
58 virtual ~VersionUpdater() {} 54 virtual ~VersionUpdater() {}
59 55
60 // Sub-classes must implement this method to create the respective 56 // Sub-classes must implement this method to create the respective
61 // specialization. 57 // specialization.
62 static VersionUpdater* Create(content::BrowserContext* context); 58 static VersionUpdater* Create();
63 59
64 // Begins the update process by checking for update availability. 60 // Begins the update process by checking for update availability.
65 // |status_callback| is called for each status update. |promote_callback| can 61 // |status_callback| is called for each status update. |promote_callback| can
66 // be used to show or hide the promote UI elements. 62 // be used to show or hide the promote UI elements.
67 virtual void CheckForUpdate(const StatusCallback& status_callback 63 virtual void CheckForUpdate(const StatusCallback& status_callback
68 #if defined(OS_MACOSX) 64 #if defined(OS_MACOSX)
69 , const PromoteCallback& promote_callback 65 , const PromoteCallback& promote_callback
70 #endif 66 #endif
71 ) = 0; 67 ) = 0;
72 68
73 #if defined(OS_MACOSX) 69 #if defined(OS_MACOSX)
74 // Make updates available for all users. 70 // Make updates available for all users.
75 virtual void PromoteUpdater() const = 0; 71 virtual void PromoteUpdater() const = 0;
76 #endif 72 #endif
77 73
78 // Relaunches the browser, generally after being updated. 74 // Relaunches the browser, generally after being updated.
79 virtual void RelaunchBrowser() const = 0; 75 virtual void RelaunchBrowser() const = 0;
80 76
81 #if defined(OS_CHROMEOS) 77 #if defined(OS_CHROMEOS)
82 virtual void SetChannel(const std::string& channel, 78 virtual void SetChannel(const std::string& channel,
83 bool is_powerwash_allowed) = 0; 79 bool is_powerwash_allowed) = 0;
84 virtual void GetChannel(bool get_current_channel, 80 virtual void GetChannel(bool get_current_channel,
85 const ChannelCallback& callback) = 0; 81 const ChannelCallback& callback) = 0;
86 #endif 82 #endif
87 }; 83 };
88 84
89 #endif // CHROME_BROWSER_UI_WEBUI_HELP_VERSION_UPDATER_H_ 85 #endif // CHROME_BROWSER_UI_WEBUI_HELP_VERSION_UPDATER_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/help/help_handler.cc ('k') | chrome/browser/ui/webui/help/version_updater_basic.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698