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

Side by Side Diff: chrome/browser/chromeos/login/session_manager_observer.cc

Issue 8727037: Signed settings refactoring: Proper caching and more tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed comments. Fixed small bugs. Rebased to ToT. Created 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #include "chrome/browser/chromeos/login/session_manager_observer.h" 5 #include "chrome/browser/chromeos/login/session_manager_observer.h"
6 6
7 #include "chrome/browser/browser_process.h" 7 #include "chrome/browser/browser_process.h"
8 #include "chrome/browser/chromeos/login/signed_settings.h" 8 #include "chrome/browser/chromeos/login/signed_settings.h"
9 #include "chrome/browser/chromeos/login/signed_settings_temp_storage.h" 9 #include "chrome/browser/chromeos/login/signed_settings_cache.h"
10 #include "chrome/common/chrome_notification_types.h" 10 #include "chrome/common/chrome_notification_types.h"
11 #include "content/public/browser/browser_thread.h" 11 #include "content/public/browser/browser_thread.h"
12 #include "content/public/browser/notification_service.h" 12 #include "content/public/browser/notification_service.h"
13 13
14 namespace chromeos { 14 namespace chromeos {
15 15
16 namespace { 16 namespace {
17 17
18 class StubDelegate 18 class StubDelegate
19 : public SignedSettings::Delegate< 19 : public SignedSettings::Delegate<
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 // indicating that we're done with this attempt. 57 // indicating that we're done with this attempt.
58 content::NotificationService::current()->Notify( 58 content::NotificationService::current()->Notify(
59 result, 59 result,
60 content::NotificationService::AllSources(), 60 content::NotificationService::AllSources(),
61 content::NotificationService::NoDetails()); 61 content::NotificationService::NoDetails());
62 62
63 // We stored some settings in transient storage before owner was assigned. 63 // We stored some settings in transient storage before owner was assigned.
64 // Now owner is assigned and key is generated and we should persist 64 // Now owner is assigned and key is generated and we should persist
65 // those settings into signed storage. 65 // those settings into signed storage.
66 if (g_browser_process && g_browser_process->local_state()) { 66 if (g_browser_process && g_browser_process->local_state()) {
67 SignedSettingsTempStorage::Finalize(g_browser_process->local_state()); 67 signed_settings_cache::Finalize(g_browser_process->local_state());
68 } 68 }
69 } 69 }
70 70
71 void SessionManagerObserver::PropertyChangeComplete(bool success) { 71 void SessionManagerObserver::PropertyChangeComplete(bool success) {
72 if (success) { 72 if (success) {
73 StubDelegate* stub = new StubDelegate(); // Manages its own lifetime. 73 StubDelegate* stub = new StubDelegate(); // Manages its own lifetime.
74 stub->set_fetcher(SignedSettings::CreateRetrievePolicyOp(stub)); 74 stub->set_fetcher(SignedSettings::CreateRetrievePolicyOp(stub));
75 stub->fetcher()->Execute(); 75 stub->fetcher()->Execute();
76 } 76 }
77 } 77 }
78 78
79 } // namespace chromeos 79 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/ownership_service.cc ('k') | chrome/browser/chromeos/login/signed_settings.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698