Commit 55e43ef0 authored by kinuko@chromium.org's avatar kinuko@chromium.org

Fix DriveFileSyncService::GetOriginForEntry

Now that we only use the host part of the given origin, we need to call
DirectoryTitleToOrigin() before making a origin GURL.

BUG=156041
TEST=manual

Review URL: https://codereview.chromium.org/11421222

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@171124 0039d316-1c4b-4281-b951-d872f2087c98
parent 8e0438a7
......@@ -1479,9 +1479,9 @@ bool DriveFileSyncService::GetOriginForEntry(
itr != entry.links().end(); ++itr) {
if ((*itr)->type() != google_apis::Link::LINK_PARENT)
continue;
GURL origin(UTF16ToUTF8((*itr)->title()));
if (!origin.is_valid())
continue;
GURL origin(DriveFileSyncClient::DirectoryTitleToOrigin(
UTF16ToUTF8((*itr)->title())));
DCHECK(origin.is_valid());
if (!metadata_store_->IsBatchSyncOrigin(origin) &&
!metadata_store_->IsIncrementalSyncOrigin(origin))
......
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