Fix compile issue for 1133315.

This is a reland for 1133315. A global function was mistakenly moved lower, and was not visible to calls that happened before it.

Refactor BrowserDMTokenStorage for easier platform implementations.

This CL refactors BrowserDMTokenStorage & BrowserDMTokenStorageWin to move code that is common to all platforms.

After this CL, adding a new platform requires implementing the following methods:

-  virtual std::string InitClientId();
-  virtual std::string InitEnrollmentToken();
-  virtual std::string InitDMToken();
-  virtual void SaveDMToken(const std::string& token);

Note that this CL keeps the existing Windows implementation, it only refactors the code (no functional change).

BUG=812641

TBR: pastarmovj
Change-Id: I51d6b4efef6066d602a59c514e9db88e414e4337
Reviewed-on: https://chromium-review.googlesource.com/1138539
Reviewed-by: Georges Khalil <georgesak@chromium.org>
Commit-Queue: Georges Khalil <georgesak@chromium.org>
Cr-Commit-Position: refs/heads/master@{#575356}
11 files changed