Index: chrome/browser/ui/webui/feedback_ui.cc |
diff --git a/chrome/browser/ui/webui/feedback_ui.cc b/chrome/browser/ui/webui/feedback_ui.cc |
index 8579ea9c554df4b624d08d84b33b463bd7ebf1fc..2cbbad82a933c068e5d8fc9c146e0c806885af8a 100644 |
--- a/chrome/browser/ui/webui/feedback_ui.cc |
+++ b/chrome/browser/ui/webui/feedback_ui.cc |
@@ -62,7 +62,6 @@ |
#include "base/file_util.h" |
#include "base/path_service.h" |
#include "chrome/browser/chromeos/drive/drive.pb.h" |
-#include "chrome/browser/chromeos/drive/drive_integration_service.h" |
#include "chrome/browser/chromeos/drive/file_system_interface.h" |
#include "chrome/browser/chromeos/drive/file_system_util.h" |
#include "chrome/browser/chromeos/login/user_manager.h" |
@@ -582,8 +581,12 @@ void FeedbackHandler::GetMostRecentScreenshotsDrive( |
const base::FilePath& filepath, std::vector<std::string>* saved_screenshots, |
size_t max_saved, base::Closure callback) { |
drive::FileSystemInterface* file_system = |
- drive::DriveIntegrationServiceFactory::GetForProfile( |
- Profile::FromWebUI(web_ui()))->file_system(); |
+ drive::util::GetFileSystemByProfile(Profile::FromWebUI(web_ui())); |
+ if (!file_system) { |
+ callback.Run(); |
+ return; |
+ } |
+ |
file_system->ReadDirectoryByPath( |
drive::util::ExtractDrivePath(filepath), |
base::Bind(&ReadDirectoryCallback, max_saved, saved_screenshots, |