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

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

Issue 10413072: Teaching BrowsingDataRemover how to delete application data. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Ugh. Created 8 years, 7 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/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after
482 if (browsing_data_remover_) 482 if (browsing_data_remover_)
483 return; 483 return;
484 484
485 Profile* profile = Profile::FromBrowserContext( 485 Profile* profile = Profile::FromBrowserContext(
486 web_ui()->GetWebContents()->GetBrowserContext()); 486 web_ui()->GetWebContents()->GetBrowserContext());
487 browsing_data_remover_ = 487 browsing_data_remover_ =
488 new BrowsingDataRemover(profile, 488 new BrowsingDataRemover(profile,
489 BrowsingDataRemover::EVERYTHING, 489 BrowsingDataRemover::EVERYTHING,
490 base::Time()); 490 base::Time());
491 browsing_data_remover_->AddObserver(this); 491 browsing_data_remover_->AddObserver(this);
492 browsing_data_remover_->Remove(BrowsingDataRemover::REMOVE_SITE_DATA); 492 browsing_data_remover_->Remove(BrowsingDataRemover::REMOVE_SITE_DATA,
jochen (gone - plz use gerrit) 2012/05/24 11:34:04 all arguments on separate lines, or align them aft
493 BrowsingDataRemover::UNPROTECTED_WEB);
493 } 494 }
494 495
495 void EnterpriseOAuthEnrollmentScreenHandler::RevokeTokens() { 496 void EnterpriseOAuthEnrollmentScreenHandler::RevokeTokens() {
496 Profile* profile = Profile::FromBrowserContext( 497 Profile* profile = Profile::FromBrowserContext(
497 web_ui()->GetWebContents()->GetBrowserContext()); 498 web_ui()->GetWebContents()->GetBrowserContext());
498 499
499 if (!access_token_.empty()) { 500 if (!access_token_.empty()) {
500 new TokenRevoker(access_token_, access_token_secret_, profile); 501 new TokenRevoker(access_token_, access_token_secret_, profile);
501 access_token_.clear(); 502 access_token_.clear();
502 } 503 }
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
537 controller_->OnConfirmationClosed(back_to_signin); 538 controller_->OnConfirmationClosed(back_to_signin);
538 } 539 }
539 540
540 void EnterpriseOAuthEnrollmentScreenHandler::UMAFailure(int sample) { 541 void EnterpriseOAuthEnrollmentScreenHandler::UMAFailure(int sample) {
541 if (is_auto_enrollment_) 542 if (is_auto_enrollment_)
542 sample = policy::kMetricEnrollmentAutoFailed; 543 sample = policy::kMetricEnrollmentAutoFailed;
543 UMA(sample); 544 UMA(sample);
544 } 545 }
545 546
546 } // namespace chromeos 547 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698