| Index: chrome/browser/extensions/api/system_info/system_info_api.cc
|
| diff --git a/chrome/browser/extensions/api/system_info/system_info_api.cc b/chrome/browser/extensions/api/system_info/system_info_api.cc
|
| index e70b9df813e47dbd802a0aa706cf9ab675e10f3b..8d198d3f69724c8c4878301a28f650ecc87f06ed 100644
|
| --- a/chrome/browser/extensions/api/system_info/system_info_api.cc
|
| +++ b/chrome/browser/extensions/api/system_info/system_info_api.cc
|
| @@ -95,8 +95,8 @@ class SystemInfoEventRouter : public gfx::DisplayObserver,
|
|
|
| // The callbacks of querying storage info to start and stop watching the
|
| // storages. Called from UI thread.
|
| - void StartWatchingStorages(const StorageInfo& info, bool success);
|
| - void StopWatchingStorages(const StorageInfo& info, bool success);
|
| + void StartWatchingStorages(bool success);
|
| + void StopWatchingStorages(bool success);
|
|
|
| // Called to dispatch the systemInfo.display.onDisplayChanged event.
|
| void OnDisplayChanged();
|
| @@ -126,24 +126,26 @@ SystemInfoEventRouter::~SystemInfoEventRouter() {
|
| chrome::StorageMonitor::GetInstance()->RemoveObserver(this);
|
| }
|
|
|
| -void SystemInfoEventRouter::StartWatchingStorages(
|
| - const StorageInfo& info, bool success) {
|
| +void SystemInfoEventRouter::StartWatchingStorages(bool success) {
|
| DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
|
| if (!success)
|
| return;
|
|
|
| - for (StorageInfo::const_iterator it = info.begin(); it != info.end(); ++it) {
|
| + const StorageInfo* info = StorageInfoProvider::Get()->storage_info();
|
| + for (StorageInfo::const_iterator it = info->begin();
|
| + it != info->end(); ++it) {
|
| StorageInfoProvider::Get()->StartWatching((*it)->id);
|
| }
|
| }
|
|
|
| -void SystemInfoEventRouter::StopWatchingStorages(
|
| - const StorageInfo& info, bool success) {
|
| +void SystemInfoEventRouter::StopWatchingStorages(bool success) {
|
| DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
|
| if (!success)
|
| return;
|
|
|
| - for (StorageInfo::const_iterator it = info.begin(); it != info.end(); ++it) {
|
| + const StorageInfo* info = StorageInfoProvider::Get()->storage_info();
|
| + for (StorageInfo::const_iterator it = info->begin();
|
| + it != info->end(); ++it) {
|
| StorageInfoProvider::Get()->StopWatching((*it)->id);
|
| }
|
| }
|
|
|