OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 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 | 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_RENDERER_HOST_PEPPER_DEVICE_ID_FETCHER_H_ | 5 #ifndef CHROME_BROWSER_RENDERER_HOST_PEPPER_DEVICE_ID_FETCHER_H_ |
6 #define CHROME_BROWSER_RENDERER_HOST_PEPPER_DEVICE_ID_FETCHER_H_ | 6 #define CHROME_BROWSER_RENDERER_HOST_PEPPER_DEVICE_ID_FETCHER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 22 matching lines...) Expand all Loading... |
33 public: | 33 public: |
34 typedef base::Callback<void(const std::string&)> IDCallback; | 34 typedef base::Callback<void(const std::string&)> IDCallback; |
35 | 35 |
36 explicit DeviceIDFetcher(int render_process_id); | 36 explicit DeviceIDFetcher(int render_process_id); |
37 | 37 |
38 // Schedules the request operation. Returns false if a request is in progress, | 38 // Schedules the request operation. Returns false if a request is in progress, |
39 // true otherwise. | 39 // true otherwise. |
40 bool Start(const IDCallback& callback); | 40 bool Start(const IDCallback& callback); |
41 | 41 |
42 // Called to register the |kEnableDRM| and |kDRMSalt| preferences. | 42 // Called to register the |kEnableDRM| and |kDRMSalt| preferences. |
43 static void RegisterUserPrefs(user_prefs::PrefRegistrySyncable* prefs); | 43 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* prefs); |
44 | 44 |
45 // Return the path where the legacy device ID is stored (for ChromeOS only). | 45 // Return the path where the legacy device ID is stored (for ChromeOS only). |
46 static base::FilePath GetLegacyDeviceIDPath( | 46 static base::FilePath GetLegacyDeviceIDPath( |
47 const base::FilePath& profile_path); | 47 const base::FilePath& profile_path); |
48 | 48 |
49 private: | 49 private: |
50 ~DeviceIDFetcher(); | 50 ~DeviceIDFetcher(); |
51 | 51 |
52 // Checks the preferences for DRM (whether DRM is enabled and getting the drm | 52 // Checks the preferences for DRM (whether DRM is enabled and getting the drm |
53 // salt) on the UI thread. These are passed to |ComputeOnIOThread|. | 53 // salt) on the UI thread. These are passed to |ComputeOnIOThread|. |
(...skipping 22 matching lines...) Expand all Loading... |
76 bool in_progress_; | 76 bool in_progress_; |
77 | 77 |
78 int render_process_id_; | 78 int render_process_id_; |
79 | 79 |
80 DISALLOW_COPY_AND_ASSIGN(DeviceIDFetcher); | 80 DISALLOW_COPY_AND_ASSIGN(DeviceIDFetcher); |
81 }; | 81 }; |
82 | 82 |
83 } // namespace chrome | 83 } // namespace chrome |
84 | 84 |
85 #endif // CHROME_BROWSER_RENDERER_HOST_PEPPER_DEVICE_ID_FETCHER_H_ | 85 #endif // CHROME_BROWSER_RENDERER_HOST_PEPPER_DEVICE_ID_FETCHER_H_ |
OLD | NEW |