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

Unified Diff: chrome/browser/chromeos/settings/device_settings_service.h

Issue 640063008: Revert of Implemented OwnerSettingsService::Set() method. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/settings/device_settings_service.h
diff --git a/chrome/browser/chromeos/settings/device_settings_service.h b/chrome/browser/chromeos/settings/device_settings_service.h
index ef24d19d533b9ad0a40bfdfbcc99dddff1f612e7..6f2ebdf8b70652a73f620504a296a8471f16bbce 100644
--- a/chrome/browser/chromeos/settings/device_settings_service.h
+++ b/chrome/browser/chromeos/settings/device_settings_service.h
@@ -12,7 +12,6 @@
#include "base/basictypes.h"
#include "base/callback.h"
#include "base/compiler_specific.h"
-#include "base/memory/linked_ptr.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "base/observer_list.h"
@@ -139,9 +138,6 @@
const base::Closure& callback);
// Sets the management related settings in PolicyData.
- //
- // TODO (ygorshenin@, crbug.com/230018): move this to the
- // OwnerSettingsService.
void SetManagementSettings(
enterprise_management::PolicyData::ManagementMode management_mode,
const std::string& request_token,
@@ -173,8 +169,6 @@
const std::string& GetUsername() const;
- ownership::OwnerSettingsService* GetOwnerSettingsService() const;
-
// Adds an observer.
void AddObserver(Observer* observer);
// Removes an observer.
@@ -189,14 +183,10 @@
// Enqueues a new operation. Takes ownership of |operation| and starts it
// right away if there is no active operation currently.
- void Enqueue(const linked_ptr<SessionManagerOperation>& operation);
+ void Enqueue(SessionManagerOperation* operation);
// Enqueues a load operation.
void EnqueueLoad(bool force_key_load);
-
- // Enqueues a sign and store operation.
- void EnqueueSignAndStore(scoped_ptr<enterprise_management::PolicyData> policy,
- const base::Closure& callback);
// Makes sure there's a reload operation so changes to the settings (and key,
// in case force_key_load is set) are getting picked up.
@@ -214,6 +204,19 @@
// Updates status and invokes the callback immediately.
void HandleError(Status status, const base::Closure& callback);
+ // Called by OwnerSettingsService when sign-and-store operation completes.
+ void OnSignAndStoreOperationCompleted(Status status);
+
+ void set_policy_data(
+ scoped_ptr<enterprise_management::PolicyData> policy_data) {
+ policy_data_ = policy_data.Pass();
+ }
+
+ void set_device_settings(scoped_ptr<
+ enterprise_management::ChromeDeviceSettingsProto> device_settings) {
+ device_settings_ = device_settings.Pass();
+ }
+
SessionManagerClient* session_manager_client_;
scoped_refptr<ownership::OwnerKeyUtil> owner_key_util_;
@@ -230,9 +233,9 @@
// The queue of pending operations. The first operation on the queue is
// currently active; it gets removed and destroyed once it completes.
- std::deque<linked_ptr<SessionManagerOperation>> pending_operations_;
-
- ObserverList<Observer> observers_;
+ std::deque<SessionManagerOperation*> pending_operations_;
+
+ ObserverList<Observer, true> observers_;
// For recoverable load errors how many retries are left before we give up.
int load_retries_left_;

Powered by Google App Engine
This is Rietveld 408576698