| Index: chrome/browser/renderer_host/pepper/device_id_fetcher.h
|
| diff --git a/chrome/browser/renderer_host/pepper/device_id_fetcher.h b/chrome/browser/renderer_host/pepper/device_id_fetcher.h
|
| index 1373bdffb236f4ee7e8499500f3a37c0c54b78e8..e4059754c053c0a20288602410380ac098571f8f 100644
|
| --- a/chrome/browser/renderer_host/pepper/device_id_fetcher.h
|
| +++ b/chrome/browser/renderer_host/pepper/device_id_fetcher.h
|
| @@ -12,6 +12,7 @@
|
| #include "base/compiler_specific.h"
|
| #include "base/files/file_path.h"
|
| #include "base/memory/ref_counted.h"
|
| +#include "base/memory/weak_ptr.h"
|
| #include "ppapi/c/pp_instance.h"
|
|
|
| class Profile;
|
| @@ -42,31 +43,21 @@ class DeviceIDFetcher : public base::RefCountedThreadSafe<DeviceIDFetcher> {
|
| // Called to register the |kEnableDRM| and |kDRMSalt| preferences.
|
| static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* prefs);
|
|
|
| - // Return the path where the legacy device ID is stored (for ChromeOS only).
|
| - static base::FilePath GetLegacyDeviceIDPath(
|
| - const base::FilePath& profile_path);
|
| -
|
| private:
|
| ~DeviceIDFetcher();
|
|
|
| // Checks the preferences for DRM (whether DRM is enabled and getting the drm
|
| - // salt) on the UI thread. These are passed to |ComputeOnIOThread|.
|
| + // salt) on the UI thread.
|
| void CheckPrefsOnUIThread();
|
|
|
| - // Compute the device ID on the IO thread with the given salt.
|
| - void ComputeOnIOThread(const std::string& salt);
|
| - // Legacy method used to get the device ID for ChromeOS.
|
| - void ComputeOnBlockingPool(const base::FilePath& profile_path,
|
| - const std::string& salt);
|
| + // Compute the device ID on the UI thread with the given salt and machine ID.
|
| + void ComputeOnUIThread(const std::vector<uint8>& salt_bytes,
|
| + const std::string& machine_id);
|
|
|
| // Runs the callback passed into Start() on the IO thread with the device ID
|
| // or the empty string on failure.
|
| void RunCallbackOnIOThread(const std::string& id);
|
|
|
| - // Helper which returns an ID unique to the system. Returns an empty string if
|
| - // the call fails.
|
| - std::string GetMachineID();
|
| -
|
| friend class base::RefCountedThreadSafe<DeviceIDFetcher>;
|
|
|
| // The callback to run when the ID has been fetched.
|
| @@ -77,6 +68,8 @@ class DeviceIDFetcher : public base::RefCountedThreadSafe<DeviceIDFetcher> {
|
|
|
| int render_process_id_;
|
|
|
| + base::WeakPtrFactory<DeviceIDFetcher> weak_ptr_factory_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(DeviceIDFetcher);
|
| };
|
|
|
|
|