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

Side by Side Diff: chrome/browser/ui/webui/chromeos/drive_internals_ui.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
« no previous file with comments | « chrome/browser/chromeos/extensions/file_manager/file_browser_private_api.cc ('k') | no next file » | 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/ui/webui/chromeos/drive_internals_ui.h" 5 #include "chrome/browser/ui/webui/chromeos/drive_internals_ui.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/format_macros.h" 10 #include "base/format_macros.h"
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 const base::Time creation_time = base::Time::FromInternalValue( 152 const base::Time creation_time = base::Time::FromInternalValue(
153 file_info.creation_time()); 153 file_info.creation_time());
154 StringAppendF(&out, " last_modified: %s\n", 154 StringAppendF(&out, " last_modified: %s\n",
155 google_apis::util::FormatTimeAsString(last_modified).c_str()); 155 google_apis::util::FormatTimeAsString(last_modified).c_str());
156 StringAppendF(&out, " last_accessed: %s\n", 156 StringAppendF(&out, " last_accessed: %s\n",
157 google_apis::util::FormatTimeAsString(last_accessed).c_str()); 157 google_apis::util::FormatTimeAsString(last_accessed).c_str());
158 StringAppendF(&out, " creation_time: %s\n", 158 StringAppendF(&out, " creation_time: %s\n",
159 google_apis::util::FormatTimeAsString(creation_time).c_str()); 159 google_apis::util::FormatTimeAsString(creation_time).c_str());
160 160
161 if (entry.has_file_specific_info()) { 161 if (entry.has_file_specific_info()) {
162 const drive::DriveFileSpecificInfo& file_specific_info = 162 const drive::FileSpecificInfo& file_specific_info =
163 entry.file_specific_info(); 163 entry.file_specific_info();
164 StringAppendF(&out, " thumbnail_url: %s\n", 164 StringAppendF(&out, " thumbnail_url: %s\n",
165 file_specific_info.thumbnail_url().c_str()); 165 file_specific_info.thumbnail_url().c_str());
166 StringAppendF(&out, " alternate_url: %s\n", 166 StringAppendF(&out, " alternate_url: %s\n",
167 file_specific_info.alternate_url().c_str()); 167 file_specific_info.alternate_url().c_str());
168 StringAppendF(&out, " content_mime_type: %s\n", 168 StringAppendF(&out, " content_mime_type: %s\n",
169 file_specific_info.content_mime_type().c_str()); 169 file_specific_info.content_mime_type().c_str());
170 StringAppendF(&out, " file_md5: %s\n", 170 StringAppendF(&out, " file_md5: %s\n",
171 file_specific_info.file_md5().c_str()); 171 file_specific_info.file_md5().c_str());
172 StringAppendF(&out, " document_extension: %s\n", 172 StringAppendF(&out, " document_extension: %s\n",
173 file_specific_info.document_extension().c_str()); 173 file_specific_info.document_extension().c_str());
174 StringAppendF(&out, " is_hosted_document: %d\n", 174 StringAppendF(&out, " is_hosted_document: %d\n",
175 file_specific_info.is_hosted_document()); 175 file_specific_info.is_hosted_document());
176 } 176 }
177 177
178 if (entry.has_directory_specific_info()) { 178 if (entry.has_directory_specific_info()) {
179 StringAppendF(&out, " directory_info\n"); 179 StringAppendF(&out, " directory_info\n");
180 const drive::DriveDirectorySpecificInfo& directory_specific_info = 180 const drive::DirectorySpecificInfo& directory_specific_info =
181 entry.directory_specific_info(); 181 entry.directory_specific_info();
182 StringAppendF(&out, " changestamp: %"PRId64"\n", 182 StringAppendF(&out, " changestamp: %"PRId64"\n",
183 directory_specific_info.changestamp()); 183 directory_specific_info.changestamp());
184 } 184 }
185 185
186 return out; 186 return out;
187 } 187 }
188 188
189 // Class to handle messages from chrome://drive-internals. 189 // Class to handle messages from chrome://drive-internals.
190 class DriveInternalsWebUIHandler : public content::WebUIMessageHandler { 190 class DriveInternalsWebUIHandler : public content::WebUIMessageHandler {
(...skipping 609 matching lines...) Expand 10 before | Expand all | Expand 10 after
800 content::WebUIDataSource::Create(chrome::kChromeUIDriveInternalsHost); 800 content::WebUIDataSource::Create(chrome::kChromeUIDriveInternalsHost);
801 source->AddResourcePath("drive_internals.css", IDR_DRIVE_INTERNALS_CSS); 801 source->AddResourcePath("drive_internals.css", IDR_DRIVE_INTERNALS_CSS);
802 source->AddResourcePath("drive_internals.js", IDR_DRIVE_INTERNALS_JS); 802 source->AddResourcePath("drive_internals.js", IDR_DRIVE_INTERNALS_JS);
803 source->SetDefaultResource(IDR_DRIVE_INTERNALS_HTML); 803 source->SetDefaultResource(IDR_DRIVE_INTERNALS_HTML);
804 804
805 Profile* profile = Profile::FromWebUI(web_ui); 805 Profile* profile = Profile::FromWebUI(web_ui);
806 content::WebUIDataSource::Add(profile, source); 806 content::WebUIDataSource::Add(profile, source);
807 } 807 }
808 808
809 } // namespace chromeos 809 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/extensions/file_manager/file_browser_private_api.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698