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

Unified Diff: chrome/browser/chromeos/first_run/drive_first_run_controller.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/first_run/drive_first_run_controller.cc
diff --git a/chrome/browser/chromeos/first_run/drive_first_run_controller.cc b/chrome/browser/chromeos/first_run/drive_first_run_controller.cc
index 1ac23aa09bfc4ddb101b6f9ba9f72991133c7e28..bd72bacfbc6078dadb3dcd181781ecffe22efd4d 100644
--- a/chrome/browser/chromeos/first_run/drive_first_run_controller.cc
+++ b/chrome/browser/chromeos/first_run/drive_first_run_controller.cc
@@ -328,13 +328,12 @@ void DriveWebContentsManager::Observe(
int type,
const content::NotificationSource& source,
const content::NotificationDetails& details) {
- if (type == chrome::NOTIFICATION_BACKGROUND_CONTENTS_OPENED) {
- const std::string app_id = base::UTF16ToUTF8(
- content::Details<BackgroundContentsOpenedDetails>(details)
- ->application_id);
- if (app_id == app_id_)
- OnOfflineInit(true, DriveFirstRunController::OUTCOME_OFFLINE_ENABLED);
- }
+ DCHECK_EQ(chrome::NOTIFICATION_BACKGROUND_CONTENTS_OPENED, type);
+ const std::string app_id = base::UTF16ToUTF8(
+ content::Details<BackgroundContentsOpenedDetails>(details)
+ ->application_id);
+ if (app_id == app_id_)
+ OnOfflineInit(true, DriveFirstRunController::OUTCOME_OFFLINE_ENABLED);
}
////////////////////////////////////////////////////////////////////////////////
« no previous file with comments | « chrome/browser/chromeos/extensions/external_cache.cc ('k') | chrome/browser/chromeos/login/auth/auth_prewarmer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698