Chromium Code Reviews| 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 465bc77347478b7255d4e9bdbd2a6b0b1e2bd600..957472f1369e6b42318a8c30ea36d00e3058f9c4 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(); |
| @@ -127,23 +127,23 @@ SystemInfoEventRouter::~SystemInfoEventRouter() { |
| storage_monitor->RemoveObserver(this); |
| } |
| -void SystemInfoEventRouter::StartWatchingStorages( |
| - const StorageInfo& info, bool success) { |
| +void SystemInfoEventRouter::StartWatchingStorages(bool success) { |
|
Greg Billock
2013/07/08 18:05:06
It looks like this should just forward the call di
Haojian Wu
2013/07/09 13:45:04
Done.
|
| DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| if (!success) |
| return; |
| + 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) { |
|
Greg Billock
2013/07/08 18:05:06
Same here.
Haojian Wu
2013/07/09 13:45:04
Done.
|
| DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| if (!success) |
| return; |
| + const StorageInfo& info = StorageInfoProvider::Get()->storage_info(); |
| for (StorageInfo::const_iterator it = info.begin(); it != info.end(); ++it) { |
| StorageInfoProvider::Get()->StopWatching((*it)->id); |
| } |