Commit aead1240 authored by hshi@chromium.org's avatar hshi@chromium.org

File Manager: fix an unsafe const reference (intermittent crash).

Regression started by (http://crrev.com/148492).

The FilePath.BaseName().value() is a local temp object and it is not safe to
assign it to a const string reference. Use the display_name instead.

BUG=139736
TEST=lumpy

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@149234 0039d316-1c4b-4281-b951-d872f2087c98
parent 71db5e4b
...@@ -1152,8 +1152,7 @@ void AddMountFunction::GetLocalPathsResponseOnUIThread( ...@@ -1152,8 +1152,7 @@ void AddMountFunction::GetLocalPathsResponseOnUIThread(
} }
const FilePath& source_path = files[0].local_path; const FilePath& source_path = files[0].local_path;
const FilePath::StringType& display_name = const FilePath::StringType& display_name = files[0].display_name;
files[0].file_path.BaseName().value();
// Check if the source path is under GData cache directory. // Check if the source path is under GData cache directory.
gdata::GDataSystemService* system_service = gdata::GDataSystemService* system_service =
gdata::GDataSystemServiceFactory::GetForProfile(profile_); gdata::GDataSystemServiceFactory::GetForProfile(profile_);
......
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