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

Side by Side Diff: chrome/browser/ui/webui/chromeos/login/enterprise_oauth_enrollment_screen_handler.cc

Issue 10830210: Fix crbug.com/140910 (BrowsingDataRemover not working). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More places fixed, added DCHECK and conversion to BrowsingDataRemover. Created 8 years, 4 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 | Annotate | Revision Log
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/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
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
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
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser_commands.cc ('k') | chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698