Commit 473a336d authored by hidehiko@chromium.org's avatar hidehiko@chromium.org

Replace direct use of DriveIntegrationServiceFactory with drive::util::GetFileSystemByProfile.

DriveIntegrationServiceFactory::GetForProfile will return the instance
regardless of whether the Drive is enabled or not. GetFileSystemByProfile will
still be looking at enabled state.

BUG=284972
TEST=Ran unit_tests

Review URL: https://chromiumcodereview.appspot.com/23739005

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@221998 0039d316-1c4b-4281-b951-d872f2087c98
parent 3a884d64
...@@ -33,7 +33,6 @@ ...@@ -33,7 +33,6 @@
#include "net/base/net_util.h" #include "net/base/net_util.h"
#if defined(OS_CHROMEOS) #if defined(OS_CHROMEOS)
#include "chrome/browser/chromeos/drive/drive_integration_service.h"
#include "chrome/browser/chromeos/drive/file_errors.h" #include "chrome/browser/chromeos/drive/file_errors.h"
#include "chrome/browser/chromeos/drive/file_system_interface.h" #include "chrome/browser/chromeos/drive/file_system_interface.h"
#include "chrome/browser/chromeos/drive/file_system_util.h" #include "chrome/browser/chromeos/drive/file_system_util.h"
...@@ -194,14 +193,14 @@ class PlatformAppPathLauncher ...@@ -194,14 +193,14 @@ class PlatformAppPathLauncher
void GetMimeTypeAndLaunchForDriveFile() { void GetMimeTypeAndLaunchForDriveFile() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
drive::DriveIntegrationService* service = drive::FileSystemInterface* file_system =
drive::DriveIntegrationServiceFactory::FindForProfile(profile_); drive::util::GetFileSystemByProfile(profile_);
if (!service) { if (!file_system) {
LaunchWithNoLaunchData(); LaunchWithNoLaunchData();
return; return;
} }
service->file_system()->GetFileByPath( file_system->GetFileByPath(
drive::util::ExtractDrivePath(file_path_), drive::util::ExtractDrivePath(file_path_),
base::Bind(&PlatformAppPathLauncher::OnGotDriveFile, this)); base::Bind(&PlatformAppPathLauncher::OnGotDriveFile, this));
} }
......
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