X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fchrome%2Fbrowser%2Fchromeos%2Fdrive%2Ffile_system_util.cc;h=db8043cc94a49cf424ce87048a7010395b6137c9;hb=4a1a0bdd01eef90b0826a0e761d3379d3715c10f;hp=416bbc52d221d96806655c4afbc4129fc504e56e;hpb=b1be5ca53587d23e7aeb77b26861fdc0a181ffd8;p=platform%2Fframework%2Fweb%2Fcrosswalk.git diff --git a/src/chrome/browser/chromeos/drive/file_system_util.cc b/src/chrome/browser/chromeos/drive/file_system_util.cc index 416bbc5..db8043c 100644 --- a/src/chrome/browser/chromeos/drive/file_system_util.cc +++ b/src/chrome/browser/chromeos/drive/file_system_util.cc @@ -36,8 +36,8 @@ #include "chrome/common/pref_names.h" #include "chrome/common/url_constants.h" #include "chromeos/chromeos_constants.h" +#include "components/user_manager/user_manager.h" #include "content/public/browser/browser_thread.h" -#include "google_apis/drive/gdata_wapi_parser.h" #include "net/base/escape.h" #include "webkit/browser/fileapi/file_system_url.h" @@ -109,8 +109,9 @@ base::FilePath GetDriveMountPointPathForUserIdHash( FILE_PATH_LITERAL("/special"); static const char kDriveMountPointNameBase[] = "drive"; return base::FilePath(kSpecialMountPointRoot).AppendASCII( - net::EscapePath(kDriveMountPointNameBase + - (user_id_hash.empty() ? "" : "-" + user_id_hash))); + net::EscapeQueryParamValue( + kDriveMountPointNameBase + + (user_id_hash.empty() ? "" : "-" + user_id_hash), false)); } base::FilePath GetDriveMountPointPath(Profile* profile) { @@ -120,10 +121,11 @@ base::FilePath GetDriveMountPointPath(Profile* profile) { // enabled. In that case, we fall back to use UserManager (it basically just // returns currently active users's hash in such a case.) I still try // ProfileHelper first because it works better in tests. - chromeos::User* const user = - chromeos::UserManager::IsInitialized() ? - chromeos::UserManager::Get()->GetUserByProfile( - profile->GetOriginalProfile()) : NULL; + user_manager::User* const user = + user_manager::UserManager::IsInitialized() + ? chromeos::ProfileHelper::Get()->GetUserByProfile( + profile->GetOriginalProfile()) + : NULL; if (user) id = user->username_hash(); } @@ -342,12 +344,6 @@ bool CreateGDocFile(const base::FilePath& file_path, static_cast(content.size()); } -bool HasGDocFileExtension(const base::FilePath& file_path) { - return google_apis::ResourceEntry::ClassifyEntryKindByFileExtension( - file_path) & - google_apis::ResourceEntry::KIND_OF_HOSTED_DOCUMENT; -} - GURL ReadUrlFromGDocFile(const base::FilePath& file_path) { return GURL(ReadStringFromGDocFile(file_path, "url")); }