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

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

Issue 562603002: Move PageTransition from //content/public/common to //ui/base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 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 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/files/file_util.h" 10 #include "base/files/file_util.h"
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 void EchoPrivateGetUserConsentFunction::OnAccept() { 207 void EchoPrivateGetUserConsentFunction::OnAccept() {
208 Finalize(true); 208 Finalize(true);
209 } 209 }
210 210
211 void EchoPrivateGetUserConsentFunction::OnCancel() { 211 void EchoPrivateGetUserConsentFunction::OnCancel() {
212 Finalize(false); 212 Finalize(false);
213 } 213 }
214 214
215 void EchoPrivateGetUserConsentFunction::OnMoreInfoLinkClicked() { 215 void EchoPrivateGetUserConsentFunction::OnMoreInfoLinkClicked() {
216 chrome::NavigateParams params( 216 chrome::NavigateParams params(
217 GetProfile(), GURL(kMoreInfoLink), content::PAGE_TRANSITION_LINK); 217 GetProfile(), GURL(kMoreInfoLink), ui::PAGE_TRANSITION_LINK);
218 // Open the link in a new window. The echo dialog is modal, so the current 218 // Open the link in a new window. The echo dialog is modal, so the current
219 // window is useless until the dialog is closed. 219 // window is useless until the dialog is closed.
220 params.disposition = NEW_WINDOW; 220 params.disposition = NEW_WINDOW;
221 chrome::Navigate(&params); 221 chrome::Navigate(&params);
222 } 222 }
223 223
224 void EchoPrivateGetUserConsentFunction::CheckRedeemOffersAllowed() { 224 void EchoPrivateGetUserConsentFunction::CheckRedeemOffersAllowed() {
225 chromeos::CrosSettingsProvider::TrustedStatus status = 225 chromeos::CrosSettingsProvider::TrustedStatus status =
226 chromeos::CrosSettings::Get()->PrepareTrustedValues(base::Bind( 226 chromeos::CrosSettings::Get()->PrepareTrustedValues(base::Bind(
227 &EchoPrivateGetUserConsentFunction::CheckRedeemOffersAllowed, 227 &EchoPrivateGetUserConsentFunction::CheckRedeemOffersAllowed,
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 void EchoPrivateGetUserConsentFunction::Finalize(bool consent) { 274 void EchoPrivateGetUserConsentFunction::Finalize(bool consent) {
275 // Consent should not be true if offers redeeming is disabled. 275 // Consent should not be true if offers redeeming is disabled.
276 CHECK(redeem_offers_allowed_ || !consent); 276 CHECK(redeem_offers_allowed_ || !consent);
277 results_ = echo_api::GetUserConsent::Results::Create(consent); 277 results_ = echo_api::GetUserConsent::Results::Create(consent);
278 SendResponse(true); 278 SendResponse(true);
279 279
280 // Release the reference added in |OnRedeemOffersAllowedChecked|, before 280 // Release the reference added in |OnRedeemOffersAllowedChecked|, before
281 // showing the dialog. 281 // showing the dialog.
282 Release(); 282 Release();
283 } 283 }
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/enrollment_dialog_view.cc ('k') | chrome/browser/chromeos/file_manager/open_with_browser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698