OLD | NEW |
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/ui/webui/chromeos/login/enterprise_oauth_enrollment_scr
een_handler.h" | 5 #include "chrome/browser/ui/webui/chromeos/login/enterprise_oauth_enrollment_scr
een_handler.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/callback.h" | 9 #include "base/callback.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
486 oauth_fetcher_.reset(); | 486 oauth_fetcher_.reset(); |
487 | 487 |
488 if (browsing_data_remover_) | 488 if (browsing_data_remover_) |
489 return; | 489 return; |
490 | 490 |
491 Profile* profile = Profile::FromBrowserContext( | 491 Profile* profile = Profile::FromBrowserContext( |
492 web_ui()->GetWebContents()->GetBrowserContext()); | 492 web_ui()->GetWebContents()->GetBrowserContext()); |
493 browsing_data_remover_ = | 493 browsing_data_remover_ = |
494 new BrowsingDataRemover(profile, | 494 new BrowsingDataRemover(profile, |
495 BrowsingDataRemover::EVERYTHING, | 495 BrowsingDataRemover::EVERYTHING, |
496 base::Time()); | 496 base::Time::Now()); |
497 browsing_data_remover_->AddObserver(this); | 497 browsing_data_remover_->AddObserver(this); |
498 browsing_data_remover_->Remove(BrowsingDataRemover::REMOVE_SITE_DATA, | 498 browsing_data_remover_->Remove(BrowsingDataRemover::REMOVE_SITE_DATA, |
499 BrowsingDataHelper::UNPROTECTED_WEB); | 499 BrowsingDataHelper::UNPROTECTED_WEB); |
500 } | 500 } |
501 | 501 |
502 void EnterpriseOAuthEnrollmentScreenHandler::RevokeTokens() { | 502 void EnterpriseOAuthEnrollmentScreenHandler::RevokeTokens() { |
503 Profile* profile = Profile::FromBrowserContext( | 503 Profile* profile = Profile::FromBrowserContext( |
504 web_ui()->GetWebContents()->GetBrowserContext()); | 504 web_ui()->GetWebContents()->GetBrowserContext()); |
505 | 505 |
506 if (!access_token_.empty()) { | 506 if (!access_token_.empty()) { |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
549 controller_->OnConfirmationClosed(back_to_signin); | 549 controller_->OnConfirmationClosed(back_to_signin); |
550 } | 550 } |
551 | 551 |
552 void EnterpriseOAuthEnrollmentScreenHandler::UMAFailure(int sample) { | 552 void EnterpriseOAuthEnrollmentScreenHandler::UMAFailure(int sample) { |
553 if (is_auto_enrollment_) | 553 if (is_auto_enrollment_) |
554 sample = policy::kMetricEnrollmentAutoFailed; | 554 sample = policy::kMetricEnrollmentAutoFailed; |
555 UMA(sample); | 555 UMA(sample); |
556 } | 556 } |
557 | 557 |
558 } // namespace chromeos | 558 } // namespace chromeos |
OLD | NEW |