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

Side by Side Diff: chrome/browser/chromeos/first_run/drive_first_run_controller.cc

Issue 1049873005: [chrome/browser/chromeos/] favor DCHECK_CURRENTLY_ON for better logs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/chromeos/first_run/drive_first_run_controller.h" 5 #include "chrome/browser/chromeos/first_run/drive_first_run_controller.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ash/system/tray/system_tray_delegate.h" 8 #include "ash/system/tray/system_tray_delegate.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after
430 } 430 }
431 431
432 void DriveFirstRunController::CleanUp() { 432 void DriveFirstRunController::CleanUp() {
433 if (web_contents_manager_) 433 if (web_contents_manager_)
434 web_contents_manager_->StopLoad(); 434 web_contents_manager_->StopLoad();
435 web_contents_timer_.Stop(); 435 web_contents_timer_.Stop();
436 base::MessageLoop::current()->DeleteSoon(FROM_HERE, this); 436 base::MessageLoop::current()->DeleteSoon(FROM_HERE, this);
437 } 437 }
438 438
439 void DriveFirstRunController::OnOfflineInit(bool success, UMAOutcome outcome) { 439 void DriveFirstRunController::OnOfflineInit(bool success, UMAOutcome outcome) {
440 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); 440 DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
441 if (success) 441 if (success)
442 ShowNotification(); 442 ShowNotification();
443 UMA_HISTOGRAM_ENUMERATION("DriveOffline.CrosAutoEnableOutcome", 443 UMA_HISTOGRAM_ENUMERATION("DriveOffline.CrosAutoEnableOutcome",
444 outcome, OUTCOME_MAX); 444 outcome, OUTCOME_MAX);
445 FOR_EACH_OBSERVER(Observer, observer_list_, OnCompletion(success)); 445 FOR_EACH_OBSERVER(Observer, observer_list_, OnCompletion(success));
446 CleanUp(); 446 CleanUp();
447 } 447 }
448 448
449 void DriveFirstRunController::ShowNotification() { 449 void DriveFirstRunController::ShowNotification() {
450 ExtensionService* service = 450 ExtensionService* service =
(...skipping 17 matching lines...) Expand all
468 base::UTF8ToUTF16(extension->name()), 468 base::UTF8ToUTF16(extension->name()),
469 message_center::NotifierId(message_center::NotifierId::APPLICATION, 469 message_center::NotifierId(message_center::NotifierId::APPLICATION,
470 kDriveHostedAppId), 470 kDriveHostedAppId),
471 data, 471 data,
472 new DriveOfflineNotificationDelegate(profile_))); 472 new DriveOfflineNotificationDelegate(profile_)));
473 notification->set_priority(message_center::LOW_PRIORITY); 473 notification->set_priority(message_center::LOW_PRIORITY);
474 message_center::MessageCenter::Get()->AddNotification(notification.Pass()); 474 message_center::MessageCenter::Get()->AddNotification(notification.Pass());
475 } 475 }
476 476
477 } // namespace chromeos 477 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/drive/file_task_executor.cc ('k') | chrome/browser/chromeos/login/screens/network_screen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698