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

Unified Diff: chrome/browser/chromeos/drive/drive_integration_service.cc

Issue 2063863002: Use DCHECKs when observing only a single notification. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/drive/drive_integration_service.cc
diff --git a/chrome/browser/chromeos/drive/drive_integration_service.cc b/chrome/browser/chromeos/drive/drive_integration_service.cc
index 00539f139437eb23cd284b13ea201b3cdb887faa..9897800d04ff7409ba8a5ac392c5a6398854d0c5 100644
--- a/chrome/browser/chromeos/drive/drive_integration_service.cc
+++ b/chrome/browser/chromeos/drive/drive_integration_service.cc
@@ -565,13 +565,12 @@ void DriveIntegrationService::Observe(
int type,
const content::NotificationSource& source,
const content::NotificationDetails& details) {
- if (type == chrome::NOTIFICATION_PROFILE_CREATED) {
- Profile* created_profile = content::Source<Profile>(source).ptr();
- if (created_profile->IsOffTheRecord() &&
- created_profile->IsSameProfile(profile_)) {
- download_handler_->ObserveIncognitoDownloadManager(
- BrowserContext::GetDownloadManager(created_profile));
- }
+ DCHECK_EQ(chrome::NOTIFICATION_PROFILE_CREATED, type);
+ Profile* created_profile = content::Source<Profile>(source).ptr();
+ if (created_profile->IsOffTheRecord() &&
+ created_profile->IsSameProfile(profile_)) {
+ download_handler_->ObserveIncognitoDownloadManager(
+ BrowserContext::GetDownloadManager(created_profile));
}
}
« no previous file with comments | « chrome/browser/chromeos/app_mode/startup_app_launcher.cc ('k') | chrome/browser/chromeos/extensions/external_cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698