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

Side by Side Diff: content/browser/media/android/media_drm_credential_manager.h

Issue 1308823002: Move Singleton and related structs to namespace base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ToT Created 5 years, 3 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 CONTENT_BROWSER_MEDIA_ANDROID_MEDIA_DRM_CREDENTIAL_MANAGER_H_ 5 #ifndef CONTENT_BROWSER_MEDIA_ANDROID_MEDIA_DRM_CREDENTIAL_MANAGER_H_
6 #define CONTENT_BROWSER_MEDIA_ANDROID_MEDIA_DRM_CREDENTIAL_MANAGER_H_ 6 #define CONTENT_BROWSER_MEDIA_ANDROID_MEDIA_DRM_CREDENTIAL_MANAGER_H_
7 7
8 #include <jni.h> 8 #include <jni.h>
9 #include <string> 9 #include <string>
10 10
(...skipping 17 matching lines...) Expand all
28 // http://crbug.com/459400 28 // http://crbug.com/459400
29 static void ResetCredentials(JNIEnv* env, jclass clazz, jobject callback); 29 static void ResetCredentials(JNIEnv* env, jclass clazz, jobject callback);
30 30
31 // Called to reset the DRM credentials. The result is returned in the 31 // Called to reset the DRM credentials. The result is returned in the
32 // |reset_credentials_cb|. 32 // |reset_credentials_cb|.
33 void ResetCredentials(const ResetCredentialsCB& reset_credentials_cb); 33 void ResetCredentials(const ResetCredentialsCB& reset_credentials_cb);
34 34
35 static bool RegisterMediaDrmCredentialManager(JNIEnv* env); 35 static bool RegisterMediaDrmCredentialManager(JNIEnv* env);
36 36
37 private: 37 private:
38 friend struct DefaultSingletonTraits<MediaDrmCredentialManager>; 38 friend struct base::DefaultSingletonTraits<MediaDrmCredentialManager>;
39 friend class Singleton<MediaDrmCredentialManager>;
40 typedef media::MediaDrmBridge::SecurityLevel SecurityLevel; 39 typedef media::MediaDrmBridge::SecurityLevel SecurityLevel;
41 40
42 MediaDrmCredentialManager(); 41 MediaDrmCredentialManager();
43 ~MediaDrmCredentialManager(); 42 ~MediaDrmCredentialManager();
44 43
45 // Callback function passed to MediaDrmBridge. It is called when credentials 44 // Callback function passed to MediaDrmBridge. It is called when credentials
46 // reset is completed. 45 // reset is completed.
47 void OnResetCredentialsCompleted(SecurityLevel security_level, bool success); 46 void OnResetCredentialsCompleted(SecurityLevel security_level, bool success);
48 47
49 // Resets DRM credentials for a particular |security_level|. Returns false if 48 // Resets DRM credentials for a particular |security_level|. Returns false if
50 // we fail to create the MediaDrmBridge at all, in which case we cannot reset 49 // we fail to create the MediaDrmBridge at all, in which case we cannot reset
51 // the credentials. Otherwise, the result is returned asynchronously in 50 // the credentials. Otherwise, the result is returned asynchronously in
52 // OnResetCredentialsCompleted() function. 51 // OnResetCredentialsCompleted() function.
53 bool ResetCredentialsInternal(SecurityLevel security_level); 52 bool ResetCredentialsInternal(SecurityLevel security_level);
54 53
55 // The MediaDrmBridge object used to perform the credential reset. 54 // The MediaDrmBridge object used to perform the credential reset.
56 scoped_ptr<media::MediaDrmBridge> media_drm_bridge_; 55 scoped_ptr<media::MediaDrmBridge> media_drm_bridge_;
57 56
58 // The callback provided by the caller. 57 // The callback provided by the caller.
59 ResetCredentialsCB reset_credentials_cb_; 58 ResetCredentialsCB reset_credentials_cb_;
60 59
61 DISALLOW_COPY_AND_ASSIGN(MediaDrmCredentialManager); 60 DISALLOW_COPY_AND_ASSIGN(MediaDrmCredentialManager);
62 }; 61 };
63 62
64 } // namespace content 63 } // namespace content
65 64
66 #endif // CONTENT_BROWSER_MEDIA_ANDROID_MEDIA_DRM_CREDENTIAL_MANAGER_H_ 65 #endif // CONTENT_BROWSER_MEDIA_ANDROID_MEDIA_DRM_CREDENTIAL_MANAGER_H_
OLDNEW
« no previous file with comments | « content/browser/mach_broker_mac.mm ('k') | content/browser/media/android/media_drm_credential_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698