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

Side by Side Diff: chrome/browser/policy/user_policy_key.h

Issue 12183017: Verify the signature on user cloud policy downloads. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comment Created 7 years, 10 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_POLICY_USER_POLICY_KEY_H_
6 #define CHROME_BROWSER_POLICY_USER_POLICY_KEY_H_
7
8 #include <vector>
9
10 #include "base/basictypes.h"
11 #include "base/callback_forward.h"
12 #include "base/file_path.h"
13 #include "base/memory/weak_ptr.h"
14 #include "base/threading/non_thread_safe.h"
15
16 namespace policy {
17
18 class UserPolicyKey : public base::NonThreadSafe {
Mattias Nissler (ping if slow) 2013/02/07 14:12:07 Not quite convinced putting this into its own clas
Joao da Silva 2013/02/07 16:32:00 Done.
19 public:
20 explicit UserPolicyKey(const FilePath& path);
21 ~UserPolicyKey();
22
23 // Reloads the user policy key from |path_|, and posts |callback| to the
24 // message loop that owns the object.
25 void Load(const base::Closure& callback);
26
27 const std::vector<uint8>& key() const { return key_; }
28
29 private:
30 void OnKeyLoaded(std::vector<uint8>* key, const base::Closure& callback);
31
32 FilePath path_;
33 std::vector<uint8> key_;
34 base::WeakPtrFactory<UserPolicyKey> weak_ptr_factory_;
Mattias Nissler (ping if slow) 2013/02/07 14:12:07 DISALLOw_COPY_AND_ASSIGN?
35 };
36
37 } // namespace policy
38
39 #endif // CHROME_BROWSER_POLICY_USER_POLICY_KEY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698