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

Side by Side Diff: chrome/browser/profiles/off_the_record_profile_impl.cc

Issue 11238034: Added completion notification to Profile's ClearNetworkingHistorySince. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Increased similarity threshold... Created 8 years, 1 month 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/profiles/off_the_record_profile_impl.h" 5 #include "chrome/browser/profiles/off_the_record_profile_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/file_path.h" 10 #include "base/file_path.h"
(...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after
445 } 445 }
446 return pref_proxy_config_tracker_.get(); 446 return pref_proxy_config_tracker_.get();
447 } 447 }
448 448
449 chrome_browser_net::Predictor* OffTheRecordProfileImpl::GetNetworkPredictor() { 449 chrome_browser_net::Predictor* OffTheRecordProfileImpl::GetNetworkPredictor() {
450 // We do not store information about websites visited in OTR profiles which 450 // We do not store information about websites visited in OTR profiles which
451 // is necessary for a Predictor, so we do not have a Predictor at all. 451 // is necessary for a Predictor, so we do not have a Predictor at all.
452 return NULL; 452 return NULL;
453 } 453 }
454 454
455 void OffTheRecordProfileImpl::ClearNetworkingHistorySince(base::Time time) { 455 void OffTheRecordProfileImpl::ClearNetworkingHistorySince(
456 base::Time time,
457 const base::Closure& completion) {
456 // No need to do anything here, our transport security state is read-only. 458 // No need to do anything here, our transport security state is read-only.
459 // Fire the callback that indicates we have finished. Otherwise BrowsingData-
460 // Remover will never be destroyed and the dialog will never be closed. Also,
mmenke 2012/10/26 19:06:20 nit: Don't think I've ever seen words split like
engedy 2012/10/29 14:37:56 Done.
461 // do this asynchronously, to avoid reentrancy issues.
462 if (!completion.is_null()) {
463 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, completion);
464 }
457 } 465 }
458 466
459 GURL OffTheRecordProfileImpl::GetHomePage() { 467 GURL OffTheRecordProfileImpl::GetHomePage() {
460 return profile_->GetHomePage(); 468 return profile_->GetHomePage();
461 } 469 }
462 470
463 void OffTheRecordProfileImpl::Observe( 471 void OffTheRecordProfileImpl::Observe(
464 int type, 472 int type,
465 const content::NotificationSource& source, 473 const content::NotificationSource& source,
466 const content::NotificationDetails& details) { 474 const content::NotificationDetails& details) {
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
506 if (!profile) 514 if (!profile)
507 profile = new OffTheRecordProfileImpl(this); 515 profile = new OffTheRecordProfileImpl(this);
508 profile->Init(); 516 profile->Init();
509 return profile; 517 return profile;
510 } 518 }
511 519
512 base::Callback<ChromeURLDataManagerBackend*(void)> 520 base::Callback<ChromeURLDataManagerBackend*(void)>
513 OffTheRecordProfileImpl::GetChromeURLDataManagerBackendGetter() const { 521 OffTheRecordProfileImpl::GetChromeURLDataManagerBackendGetter() const {
514 return io_data_.GetChromeURLDataManagerBackendGetter(); 522 return io_data_.GetChromeURLDataManagerBackendGetter();
515 } 523 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698