Index: chrome/browser/chromeos/drive/drive_file_system.cc |
diff --git a/chrome/browser/chromeos/drive/drive_file_system.cc b/chrome/browser/chromeos/drive/drive_file_system.cc |
index 52c4832120d251c0c86a5291a44e7efb0b33c3df..9b87d6c5d0f40b724560a1154d39ee911ec768d6 100644 |
--- a/chrome/browser/chromeos/drive/drive_file_system.cc |
+++ b/chrome/browser/chromeos/drive/drive_file_system.cc |
@@ -2184,21 +2184,14 @@ DriveFileSystemMetadata DriveFileSystem::GetMetadata() const { |
return metadata; |
} |
-void DriveFileSystem::Observe(int type, |
- const content::NotificationSource& source, |
- const content::NotificationDetails& details) { |
+void DriveFileSystem::OnPreferenceChanged(PrefServiceBase* service, |
+ const std::string& pref_name) { |
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
+ DCHECK(pref_name == prefs::kDisableDriveHostedFiles); |
Mattias Nissler (ping if slow)
2012/10/30 13:37:07
same comment regarding if() {} else NOTREACHED();
|
- if (type == chrome::NOTIFICATION_PREF_CHANGED) { |
- PrefService* pref_service = profile_->GetPrefs(); |
- std::string* pref_name = content::Details<std::string>(details).ptr(); |
- if (*pref_name == prefs::kDisableDriveHostedFiles) { |
- SetHideHostedDocuments( |
- pref_service->GetBoolean(prefs::kDisableDriveHostedFiles)); |
- } |
- } else { |
- NOTREACHED(); |
- } |
+ PrefService* pref_service = profile_->GetPrefs(); |
+ SetHideHostedDocuments( |
+ pref_service->GetBoolean(prefs::kDisableDriveHostedFiles)); |
} |
void DriveFileSystem::SetHideHostedDocuments(bool hide) { |