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

Side by Side Diff: chrome/browser/chromeos/extensions/echo_private_api.cc

Issue 2248873002: Convert WindowOpenDisposition to an enum class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 3 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/extensions/echo_private_api.h" 5 #include "chrome/browser/chromeos/extensions/echo_private_api.h"
6 6
7 #include <string> 7 #include <string>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 200
201 void EchoPrivateGetUserConsentFunction::OnCancel() { 201 void EchoPrivateGetUserConsentFunction::OnCancel() {
202 Finalize(false); 202 Finalize(false);
203 } 203 }
204 204
205 void EchoPrivateGetUserConsentFunction::OnMoreInfoLinkClicked() { 205 void EchoPrivateGetUserConsentFunction::OnMoreInfoLinkClicked() {
206 chrome::NavigateParams params( 206 chrome::NavigateParams params(
207 GetProfile(), GURL(kMoreInfoLink), ui::PAGE_TRANSITION_LINK); 207 GetProfile(), GURL(kMoreInfoLink), ui::PAGE_TRANSITION_LINK);
208 // Open the link in a new window. The echo dialog is modal, so the current 208 // Open the link in a new window. The echo dialog is modal, so the current
209 // window is useless until the dialog is closed. 209 // window is useless until the dialog is closed.
210 params.disposition = NEW_WINDOW; 210 params.disposition = WindowOpenDisposition::NEW_WINDOW;
211 chrome::Navigate(&params); 211 chrome::Navigate(&params);
212 } 212 }
213 213
214 void EchoPrivateGetUserConsentFunction::CheckRedeemOffersAllowed() { 214 void EchoPrivateGetUserConsentFunction::CheckRedeemOffersAllowed() {
215 chromeos::CrosSettingsProvider::TrustedStatus status = 215 chromeos::CrosSettingsProvider::TrustedStatus status =
216 chromeos::CrosSettings::Get()->PrepareTrustedValues(base::Bind( 216 chromeos::CrosSettings::Get()->PrepareTrustedValues(base::Bind(
217 &EchoPrivateGetUserConsentFunction::CheckRedeemOffersAllowed, 217 &EchoPrivateGetUserConsentFunction::CheckRedeemOffersAllowed,
218 this)); 218 this));
219 if (status == chromeos::CrosSettingsProvider::TEMPORARILY_UNTRUSTED) 219 if (status == chromeos::CrosSettingsProvider::TEMPORARILY_UNTRUSTED)
220 return; 220 return;
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 void EchoPrivateGetUserConsentFunction::Finalize(bool consent) { 271 void EchoPrivateGetUserConsentFunction::Finalize(bool consent) {
272 // Consent should not be true if offers redeeming is disabled. 272 // Consent should not be true if offers redeeming is disabled.
273 CHECK(redeem_offers_allowed_ || !consent); 273 CHECK(redeem_offers_allowed_ || !consent);
274 results_ = echo_api::GetUserConsent::Results::Create(consent); 274 results_ = echo_api::GetUserConsent::Results::Create(consent);
275 SendResponse(true); 275 SendResponse(true);
276 276
277 // Release the reference added in |OnRedeemOffersAllowedChecked|, before 277 // Release the reference added in |OnRedeemOffersAllowedChecked|, before
278 // showing the dialog. 278 // showing the dialog.
279 Release(); 279 Release();
280 } 280 }
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/eol_notification.cc ('k') | chrome/browser/chromeos/extensions/input_method_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698