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

Side by Side Diff: chrome/browser/chromeos/policy/consumer_enrollment_handler.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/policy/consumer_enrollment_handler.h" 5 #include "chrome/browser/chromeos/policy/consumer_enrollment_handler.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/location.h" 9 #include "base/location.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 public: 70 public:
71 // |button_click_callback| is called when the button in the notification is 71 // |button_click_callback| is called when the button in the notification is
72 // clicked. 72 // clicked.
73 DesktopNotificationDelegate(const std::string& id, 73 DesktopNotificationDelegate(const std::string& id,
74 const base::Closure& button_click_callback); 74 const base::Closure& button_click_callback);
75 75
76 // NotificationDelegate: 76 // NotificationDelegate:
77 virtual std::string id() const override; 77 virtual std::string id() const override;
78 virtual void Display() override; 78 virtual void Display() override;
79 virtual void ButtonClick(int button_index) override; 79 virtual void ButtonClick(int button_index) override;
80 virtual void Error() override;
81 virtual void Close(bool by_user) override; 80 virtual void Close(bool by_user) override;
82 virtual void Click() override; 81 virtual void Click() override;
83 82
84 private: 83 private:
85 virtual ~DesktopNotificationDelegate(); 84 virtual ~DesktopNotificationDelegate();
86 85
87 std::string id_; 86 std::string id_;
88 base::Closure button_click_callback_; 87 base::Closure button_click_callback_;
89 88
90 DISALLOW_COPY_AND_ASSIGN(DesktopNotificationDelegate); 89 DISALLOW_COPY_AND_ASSIGN(DesktopNotificationDelegate);
(...skipping 12 matching lines...) Expand all
103 return id_; 102 return id_;
104 } 103 }
105 104
106 void DesktopNotificationDelegate::Display() { 105 void DesktopNotificationDelegate::Display() {
107 } 106 }
108 107
109 void DesktopNotificationDelegate::ButtonClick(int button_index) { 108 void DesktopNotificationDelegate::ButtonClick(int button_index) {
110 button_click_callback_.Run(); 109 button_click_callback_.Run();
111 } 110 }
112 111
113 void DesktopNotificationDelegate::Error() {
114 }
115
116 void DesktopNotificationDelegate::Close(bool by_user) { 112 void DesktopNotificationDelegate::Close(bool by_user) {
117 } 113 }
118 114
119 void DesktopNotificationDelegate::Click() { 115 void DesktopNotificationDelegate::Click() {
120 } 116 }
121 117
122 } // namespace 118 } // namespace
123 119
124 namespace policy { 120 namespace policy {
125 121
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 void ConsumerEnrollmentHandler::TryEnrollmentAgain(Profile* profile) const { 354 void ConsumerEnrollmentHandler::TryEnrollmentAgain(Profile* profile) const {
359 const GURL base_url(chrome::kChromeUISettingsURL); 355 const GURL base_url(chrome::kChromeUISettingsURL);
360 const GURL url = base_url.Resolve(kConsumerManagementOverlay); 356 const GURL url = base_url.Resolve(kConsumerManagementOverlay);
361 357
362 chrome::NavigateParams params(profile, url, ui::PAGE_TRANSITION_LINK); 358 chrome::NavigateParams params(profile, url, ui::PAGE_TRANSITION_LINK);
363 params.disposition = NEW_FOREGROUND_TAB; 359 params.disposition = NEW_FOREGROUND_TAB;
364 chrome::Navigate(&params); 360 chrome::Navigate(&params);
365 } 361 }
366 362
367 } // namespace policy 363 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698