| Index: chrome/browser/drive/fake_drive_service.cc
|
| diff --git a/chrome/browser/drive/fake_drive_service.cc b/chrome/browser/drive/fake_drive_service.cc
|
| index 80816f475a55d3bab5b528287eed6c899979b2bc..b090b8c18f19fc902653a5d92b881f020d745ded 100644
|
| --- a/chrome/browser/drive/fake_drive_service.cc
|
| +++ b/chrome/browser/drive/fake_drive_service.cc
|
| @@ -62,10 +62,14 @@ namespace util = google_apis::util;
|
| namespace drive {
|
| namespace {
|
|
|
| -// Rel property of upload link in the entries dictionary value.
|
| +// Rel property of an upload link in the entries dictionary value.
|
| const char kUploadUrlRel[] =
|
| "http://schemas.google.com/g/2005#resumable-create-media";
|
|
|
| +// Rel property of a share link in the entries dictionary value.
|
| +const char kShareUrlRel[] =
|
| + "http://schemas.google.com/docs/2007#share";
|
| +
|
| // Returns true if a resource entry matches with the search query.
|
| // Supports queries consist of following format.
|
| // - Phrases quoted by double/single quotes
|
| @@ -1389,6 +1393,13 @@ const base::DictionaryValue* FakeDriveService::AddNewEntry(
|
| upload_link->SetString("href", upload_url.spec());
|
| upload_link->SetString("rel", kUploadUrlRel);
|
| links->Append(upload_link);
|
| +
|
| + const GURL share_url = net::AppendOrReplaceQueryParameter(
|
| + share_url_base_, "name", title);
|
| + base::DictionaryValue* share_link = new base::DictionaryValue;
|
| + upload_link->SetString("href", share_url.spec());
|
| + upload_link->SetString("rel", kShareUrlRel);
|
| + links->Append(share_link);
|
| new_entry->Set("link", links);
|
|
|
| AddNewChangestampAndETag(new_entry.get());
|
|
|