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

Side by Side Diff: chrome/browser/chromeos/extensions/file_browser_private_api.cc

Issue 10006013: [NOT FOR COMMIT] Use chrome://gdata in Photo Editor (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/resources/file_manager/js/image_editor/image_view.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/chromeos/extensions/file_browser_private_api.h" 5 #include "chrome/browser/chromeos/extensions/file_browser_private_api.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/base64.h" 9 #include "base/base64.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 1566 matching lines...) Expand 10 before | Expand all | Expand 10 after
1577 gdata::GDataFile* file = file_base->AsGDataFile(); 1577 gdata::GDataFile* file = file_base->AsGDataFile();
1578 if (!file) { 1578 if (!file) {
1579 LOG(WARNING) << "Reading properties of a non-file at " 1579 LOG(WARNING) << "Reading properties of a non-file at "
1580 << directory_path.value(); 1580 << directory_path.value();
1581 CompleteGetFileProperties(); 1581 CompleteGetFileProperties();
1582 return; 1582 return;
1583 } 1583 }
1584 1584
1585 property_dict->SetString("thumbnailUrl", file->thumbnail_url().spec()); 1585 property_dict->SetString("thumbnailUrl", file->thumbnail_url().spec());
1586 if (!file->edit_url().is_empty()) 1586 if (!file->edit_url().is_empty())
1587 property_dict->SetString("editUrl", file->edit_url().spec()); 1587 property_dict->SetString("editUrl",
1588 gdata::util::GetFileResourceUrl(file->resource_id(),
1589 file->file_name()).spec());
1588 1590
1589 if (!file->content_url().is_empty()) 1591 if (!file->content_url().is_empty())
1590 property_dict->SetString("contentUrl", file->content_url().spec()); 1592 property_dict->SetString("contentUrl", file->content_url().spec());
1591 1593
1592 property_dict->SetBoolean("isHosted", file->is_hosted_document()); 1594 property_dict->SetBoolean("isHosted", file->is_hosted_document());
1593 1595
1594 file->GetCacheState(base::Bind( 1596 file->GetCacheState(base::Bind(
1595 &GetGDataFilePropertiesFunction::CacheStateReceived, 1597 &GetGDataFilePropertiesFunction::CacheStateReceived,
1596 this, property_dict)); 1598 this, property_dict));
1597 } 1599 }
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after
1966 if (value->GetBoolean("cellularDisabled", &tmp)) { 1968 if (value->GetBoolean("cellularDisabled", &tmp)) {
1967 service->SetBoolean(prefs::kDisableGDataOverCellular, tmp); 1969 service->SetBoolean(prefs::kDisableGDataOverCellular, tmp);
1968 } 1970 }
1969 1971
1970 if (value->GetBoolean("hostedFilesDisabled", &tmp)) { 1972 if (value->GetBoolean("hostedFilesDisabled", &tmp)) {
1971 service->SetBoolean(prefs::kDisableGDataHostedFiles, tmp); 1973 service->SetBoolean(prefs::kDisableGDataHostedFiles, tmp);
1972 } 1974 }
1973 1975
1974 return true; 1976 return true;
1975 } 1977 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/resources/file_manager/js/image_editor/image_view.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698