Commit d6e03f2b authored by Allen Vicencio's avatar Allen Vicencio Committed by Commit Bot

Fix for DCHECK on SmbService initialization

This removes the initialization of TempFileManager in SmbService.
With this change, Mount will be in a broken state and will be fixed in a
future CL.

Bug: 837492
Change-Id: I07689fd5a19e2bf56aac5d2f6cd9085d2352dcad
Reviewed-on: https://chromium-review.googlesource.com/1040678
Commit-Queue: Allen Vicencio <allenvic@chromium.org>
Commit-Queue: Zentaro Kavanagh <zentaro@chromium.org>
Reviewed-by: default avatarZentaro Kavanagh <zentaro@chromium.org>
Cr-Commit-Position: refs/heads/master@{#555570}
parent ade1fefb
...@@ -40,11 +40,14 @@ SmbService* SmbService::Get(content::BrowserContext* context) { ...@@ -40,11 +40,14 @@ SmbService* SmbService::Get(content::BrowserContext* context) {
void SmbService::Mount(const file_system_provider::MountOptions& options, void SmbService::Mount(const file_system_provider::MountOptions& options,
const base::FilePath& share_path, const base::FilePath& share_path,
MountResponse callback) { MountResponse callback) {
// TODO(allenvic): Temporary workaround for https://crbug.com/837492.
CHECK(false);
// TODO(allenvic): Implement passing of credentials. This currently passes // TODO(allenvic): Implement passing of credentials. This currently passes
// empty credentials to SmbProvider. // empty credentials to SmbProvider.
GetSmbProviderClient()->Mount( GetSmbProviderClient()->Mount(
share_path, "" /* workgroup */, "" /* username */, share_path, "" /* workgroup */, "" /* username */,
temp_file_manager_.WritePasswordToFile("" /* password */), temp_file_manager_->WritePasswordToFile("" /* password */),
base::BindOnce(&SmbService::OnMountResponse, AsWeakPtr(), base::BindOnce(&SmbService::OnMountResponse, AsWeakPtr(),
base::Passed(&callback), options, share_path)); base::Passed(&callback), options, share_path));
} }
......
...@@ -85,7 +85,7 @@ class SmbService : public KeyedService, ...@@ -85,7 +85,7 @@ class SmbService : public KeyedService,
const ProviderId provider_id_; const ProviderId provider_id_;
Profile* profile_; Profile* profile_;
TempFileManager temp_file_manager_; std::unique_ptr<TempFileManager> temp_file_manager_;
DISALLOW_COPY_AND_ASSIGN(SmbService); DISALLOW_COPY_AND_ASSIGN(SmbService);
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment