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

Side by Side Diff: chrome/browser/chromeos/policy/consumer_enrollment_handler.cc

Issue 580243004: Remove unnecessary image downloading handler of notifications. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: build fix of desktop linux/win Created 6 years, 2 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 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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 68
69 class DesktopNotificationDelegate : public NotificationDelegate { 69 class DesktopNotificationDelegate : public NotificationDelegate {
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 content::WebContents* GetWebContents() const override;
79 virtual void Display() override; 78 virtual void Display() override;
80 virtual void ButtonClick(int button_index) override; 79 virtual void ButtonClick(int button_index) override;
81 virtual void Error() override; 80 virtual void Error() override;
82 virtual void Close(bool by_user) override; 81 virtual void Close(bool by_user) override;
83 virtual void Click() override; 82 virtual void Click() override;
84 83
85 private: 84 private:
86 virtual ~DesktopNotificationDelegate(); 85 virtual ~DesktopNotificationDelegate();
87 86
88 std::string id_; 87 std::string id_;
89 base::Closure button_click_callback_; 88 base::Closure button_click_callback_;
90 89
91 DISALLOW_COPY_AND_ASSIGN(DesktopNotificationDelegate); 90 DISALLOW_COPY_AND_ASSIGN(DesktopNotificationDelegate);
92 }; 91 };
93 92
94 DesktopNotificationDelegate::DesktopNotificationDelegate( 93 DesktopNotificationDelegate::DesktopNotificationDelegate(
95 const std::string& id, 94 const std::string& id,
96 const base::Closure& button_click_callback) 95 const base::Closure& button_click_callback)
97 : id_(id), button_click_callback_(button_click_callback) { 96 : id_(id), button_click_callback_(button_click_callback) {
98 } 97 }
99 98
100 DesktopNotificationDelegate::~DesktopNotificationDelegate() { 99 DesktopNotificationDelegate::~DesktopNotificationDelegate() {
101 } 100 }
102 101
103 std::string DesktopNotificationDelegate::id() const { 102 std::string DesktopNotificationDelegate::id() const {
104 return id_; 103 return id_;
105 } 104 }
106 105
107 content::WebContents* DesktopNotificationDelegate::GetWebContents() const {
108 return NULL;
109 }
110
111 void DesktopNotificationDelegate::Display() { 106 void DesktopNotificationDelegate::Display() {
112 } 107 }
113 108
114 void DesktopNotificationDelegate::ButtonClick(int button_index) { 109 void DesktopNotificationDelegate::ButtonClick(int button_index) {
115 button_click_callback_.Run(); 110 button_click_callback_.Run();
116 } 111 }
117 112
118 void DesktopNotificationDelegate::Error() { 113 void DesktopNotificationDelegate::Error() {
119 } 114 }
120 115
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 void ConsumerEnrollmentHandler::TryEnrollmentAgain(Profile* profile) const { 358 void ConsumerEnrollmentHandler::TryEnrollmentAgain(Profile* profile) const {
364 const GURL base_url(chrome::kChromeUISettingsURL); 359 const GURL base_url(chrome::kChromeUISettingsURL);
365 const GURL url = base_url.Resolve(kConsumerManagementOverlay); 360 const GURL url = base_url.Resolve(kConsumerManagementOverlay);
366 361
367 chrome::NavigateParams params(profile, url, ui::PAGE_TRANSITION_LINK); 362 chrome::NavigateParams params(profile, url, ui::PAGE_TRANSITION_LINK);
368 params.disposition = NEW_FOREGROUND_TAB; 363 params.disposition = NEW_FOREGROUND_TAB;
369 chrome::Navigate(&params); 364 chrome::Navigate(&params);
370 } 365 }
371 366
372 } // namespace policy 367 } // namespace policy
OLDNEW
« no previous file with comments | « chrome/browser/background/background_contents_service.cc ('k') | chrome/browser/chromeos/power/peripheral_battery_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698