Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2427)

Unified Diff: chrome/browser/ui/webui/feedback_ui.cc

Issue 23739006: Fix potential SEGV issue. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698