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

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

Issue 15391004: drive: Remove "Drive" prefix from DriveFileSpecificInfo and DriveDirectorySpecifiInfo (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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
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_manager/file_browser_private_a pi.h" 5 #include "chrome/browser/chromeos/extensions/file_manager/file_browser_private_a pi.h"
6 6
7 #include <sys/stat.h> 7 #include <sys/stat.h>
8 #include <sys/statvfs.h> 8 #include <sys/statvfs.h>
9 #include <sys/types.h> 9 #include <sys/types.h>
10 #include <utime.h> 10 #include <utime.h>
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 } 366 }
367 367
368 void FillDriveEntryPropertiesValue( 368 void FillDriveEntryPropertiesValue(
369 const drive::ResourceEntry& entry_proto, 369 const drive::ResourceEntry& entry_proto,
370 DictionaryValue* property_dict) { 370 DictionaryValue* property_dict) {
371 property_dict->SetBoolean("sharedWithMe", entry_proto.shared_with_me()); 371 property_dict->SetBoolean("sharedWithMe", entry_proto.shared_with_me());
372 372
373 if (!entry_proto.has_file_specific_info()) 373 if (!entry_proto.has_file_specific_info())
374 return; 374 return;
375 375
376 const drive::DriveFileSpecificInfo& file_specific_info = 376 const drive::FileSpecificInfo& file_specific_info =
377 entry_proto.file_specific_info(); 377 entry_proto.file_specific_info();
378 378
379 property_dict->SetString("thumbnailUrl", file_specific_info.thumbnail_url()); 379 property_dict->SetString("thumbnailUrl", file_specific_info.thumbnail_url());
380 380
381 property_dict->SetBoolean("isHosted", 381 property_dict->SetBoolean("isHosted",
382 file_specific_info.is_hosted_document()); 382 file_specific_info.is_hosted_document());
383 383
384 property_dict->SetString("contentMimeType", 384 property_dict->SetString("contentMimeType",
385 file_specific_info.content_mime_type()); 385 file_specific_info.content_mime_type());
386 } 386 }
(...skipping 1969 matching lines...) Expand 10 before | Expand all | Expand 10 after
2356 return; 2356 return;
2357 } 2357 }
2358 2358
2359 // The properties meaningful for directories are already filled in 2359 // The properties meaningful for directories are already filled in
2360 // FillDriveEntryPropertiesValue(). 2360 // FillDriveEntryPropertiesValue().
2361 if (entry.get() && !entry->has_file_specific_info()) { 2361 if (entry.get() && !entry->has_file_specific_info()) {
2362 CompleteGetFileProperties(error); 2362 CompleteGetFileProperties(error);
2363 return; 2363 return;
2364 } 2364 }
2365 2365
2366 const drive::DriveFileSpecificInfo& file_specific_info = 2366 const drive::FileSpecificInfo& file_specific_info =
2367 entry->file_specific_info(); 2367 entry->file_specific_info();
2368 2368
2369 // Get drive WebApps that can accept this file. 2369 // Get drive WebApps that can accept this file.
2370 ScopedVector<drive::DriveWebAppInfo> web_apps; 2370 ScopedVector<drive::DriveWebAppInfo> web_apps;
2371 system_service->webapps_registry()->GetWebAppsForFile( 2371 system_service->webapps_registry()->GetWebAppsForFile(
2372 file_path_, file_specific_info.content_mime_type(), &web_apps); 2372 file_path_, file_specific_info.content_mime_type(), &web_apps);
2373 if (!web_apps.empty()) { 2373 if (!web_apps.empty()) {
2374 std::string default_task_id = file_handler_util::GetDefaultTaskIdFromPrefs( 2374 std::string default_task_id = file_handler_util::GetDefaultTaskIdFromPrefs(
2375 profile_, 2375 profile_,
2376 file_specific_info.content_mime_type(), 2376 file_specific_info.content_mime_type(),
(...skipping 734 matching lines...) Expand 10 before | Expand all | Expand 10 after
3111 OpenNewWindowFunction::OpenNewWindowFunction() {} 3111 OpenNewWindowFunction::OpenNewWindowFunction() {}
3112 3112
3113 OpenNewWindowFunction::~OpenNewWindowFunction() {} 3113 OpenNewWindowFunction::~OpenNewWindowFunction() {}
3114 3114
3115 bool OpenNewWindowFunction::RunImpl() { 3115 bool OpenNewWindowFunction::RunImpl() {
3116 std::string url; 3116 std::string url;
3117 EXTENSION_FUNCTION_VALIDATE(args_->GetString(0, &url)); 3117 EXTENSION_FUNCTION_VALIDATE(args_->GetString(0, &url));
3118 file_manager_util::OpenNewWindow(profile_, GURL(url)); 3118 file_manager_util::OpenNewWindow(profile_, GURL(url));
3119 return true; 3119 return true;
3120 } 3120 }
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/drive/resource_metadata_unittest.cc ('k') | chrome/browser/ui/webui/chromeos/drive_internals_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698