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

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

Issue 687183004: Remove the OnError method from notification delegates. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 // offline mode is enabled automatically. Clicking on the notification button 79 // offline mode is enabled automatically. Clicking on the notification button
80 // will open the Drive settings page. 80 // will open the Drive settings page.
81 class DriveOfflineNotificationDelegate 81 class DriveOfflineNotificationDelegate
82 : public message_center::NotificationDelegate { 82 : public message_center::NotificationDelegate {
83 public: 83 public:
84 explicit DriveOfflineNotificationDelegate(Profile* profile) 84 explicit DriveOfflineNotificationDelegate(Profile* profile)
85 : profile_(profile) {} 85 : profile_(profile) {}
86 86
87 // message_center::NotificationDelegate overrides: 87 // message_center::NotificationDelegate overrides:
88 virtual void Display() override {} 88 virtual void Display() override {}
89 virtual void Error() override {}
90 virtual void Close(bool by_user) override {} 89 virtual void Close(bool by_user) override {}
91 virtual void Click() override {} 90 virtual void Click() override {}
92 virtual void ButtonClick(int button_index) override; 91 virtual void ButtonClick(int button_index) override;
93 92
94 protected: 93 protected:
95 virtual ~DriveOfflineNotificationDelegate() {} 94 virtual ~DriveOfflineNotificationDelegate() {}
96 95
97 private: 96 private:
98 Profile* profile_; 97 Profile* profile_;
99 98
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
470 base::UTF8ToUTF16(extension->name()), 469 base::UTF8ToUTF16(extension->name()),
471 message_center::NotifierId(message_center::NotifierId::APPLICATION, 470 message_center::NotifierId(message_center::NotifierId::APPLICATION,
472 kDriveHostedAppId), 471 kDriveHostedAppId),
473 data, 472 data,
474 new DriveOfflineNotificationDelegate(profile_))); 473 new DriveOfflineNotificationDelegate(profile_)));
475 notification->set_priority(message_center::LOW_PRIORITY); 474 notification->set_priority(message_center::LOW_PRIORITY);
476 message_center::MessageCenter::Get()->AddNotification(notification.Pass()); 475 message_center::MessageCenter::Get()->AddNotification(notification.Pass());
477 } 476 }
478 477
479 } // namespace chromeos 478 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698