Index: chrome/browser/ui/webui/chromeos/drive_internals_ui.cc |
diff --git a/chrome/browser/ui/webui/chromeos/drive_internals_ui.cc b/chrome/browser/ui/webui/chromeos/drive_internals_ui.cc |
index 1ba1c81ca03b7f1ae5c1c5588bb13d45e8ddc882..c137b8cc5f5bebc426ef807ed584eb934496fda6 100644 |
--- a/chrome/browser/ui/webui/chromeos/drive_internals_ui.cc |
+++ b/chrome/browser/ui/webui/chromeos/drive_internals_ui.cc |
@@ -16,6 +16,7 @@ |
#include "chrome/browser/chromeos/drive/drive.pb.h" |
#include "chrome/browser/chromeos/drive/drive_cache.h" |
#include "chrome/browser/chromeos/drive/drive_file_system_interface.h" |
+#include "chrome/browser/chromeos/drive/drive_resource_metadata.h" |
#include "chrome/browser/chromeos/drive/drive_service_interface.h" |
#include "chrome/browser/chromeos/drive/drive_system_service.h" |
#include "chrome/browser/google_apis/auth_service.h" |
@@ -237,9 +238,8 @@ void DriveInternalsWebUIHandler::OnGetAccountMetadata( |
about_resource->quota_bytes_total()); |
account_metadata.SetDouble("account-quota-used", |
about_resource->quota_bytes_used()); |
- account_metadata.SetString( |
- "account-largest-changestamp", |
- base::Int64ToString(about_resource->largest_change_id())); |
+ account_metadata.SetDouble("account-largest-changestamp-remote", |
Haruki Sato
2012/10/15 07:10:29
I personally like string here as they are consider
satorux1
2012/10/16 05:02:56
These are not IDs. These are monotonically increas
|
+ about_resource->largest_change_id()); |
// TODO(haruki): Fill installed Drive apps for Drive API. |
// http://crbug.com/154241 |
@@ -251,9 +251,8 @@ void DriveInternalsWebUIHandler::OnGetAccountMetadata( |
account_metadata.SetDouble("account-quota-total", |
feed->quota_bytes_total()); |
account_metadata.SetDouble("account-quota-used", feed->quota_bytes_used()); |
- account_metadata.SetString( |
- "account-largest-changestamp", |
- base::Int64ToString(feed->largest_changestamp())); |
+ account_metadata.SetDouble("account-largest-changestamp-remote", |
+ feed->largest_changestamp()); |
base::ListValue* installed_apps = new base::ListValue(); |
for (size_t i = 0; i < feed->installed_apps().size(); ++i) { |
@@ -269,6 +268,13 @@ void DriveInternalsWebUIHandler::OnGetAccountMetadata( |
account_metadata.Set("installed-apps", installed_apps); |
} |
+ // Add the local largest chargestamp. |
+ const drive::DriveResourceMetadata* resource_metadata = |
+ GetSystemService()->file_system()->GetResourceMetadata(); |
+ const int64 largest_changestamp = resource_metadata->largest_changestamp(); |
+ account_metadata.SetDouble("account-largest-changestamp-local", |
+ largest_changestamp); |
+ |
web_ui()->CallJavascriptFunction("updateAccountMetadata", account_metadata); |
} |