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

Side by Side Diff: chrome/browser/profile.cc

Issue 3347018: GTTF: Clean up DownloadFileManager (Closed)
Patch Set: shutdowns Created 10 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
« no previous file with comments | « chrome/browser/download/save_file.cc ('k') | chrome/browser/profile_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/profile.h" 5 #include "chrome/browser/profile.h"
6 6
7 #include "app/resource_bundle.h" 7 #include "app/resource_bundle.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/file_path.h" 9 #include "base/file_path.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after
507 } 507 }
508 508
509 #if defined(OS_CHROMEOS) 509 #if defined(OS_CHROMEOS)
510 virtual chromeos::ProxyConfigServiceImpl* 510 virtual chromeos::ProxyConfigServiceImpl*
511 GetChromeOSProxyConfigServiceImpl() { 511 GetChromeOSProxyConfigServiceImpl() {
512 return profile_->GetChromeOSProxyConfigServiceImpl(); 512 return profile_->GetChromeOSProxyConfigServiceImpl();
513 } 513 }
514 #endif // defined(OS_CHROMEOS) 514 #endif // defined(OS_CHROMEOS)
515 515
516 virtual void ExitedOffTheRecordMode() { 516 virtual void ExitedOffTheRecordMode() {
517 // Drop our download manager so we forget about all the downloads made 517 // DownloadManager is lazily created, so check before accessing it.
518 // in off-the-record mode. 518 if (download_manager_.get()) {
519 download_manager_ = NULL; 519 // Drop our download manager so we forget about all the downloads made
520 // in off-the-record mode.
521 download_manager_->Shutdown();
522 download_manager_ = NULL;
523 }
520 } 524 }
521 525
522 virtual void Observe(NotificationType type, 526 virtual void Observe(NotificationType type,
523 const NotificationSource& source, 527 const NotificationSource& source,
524 const NotificationDetails& details) { 528 const NotificationDetails& details) {
525 DCHECK_EQ(NotificationType::BROWSER_CLOSED, type.value); 529 DCHECK_EQ(NotificationType::BROWSER_CLOSED, type.value);
526 // We are only interested in OTR browser closing. 530 // We are only interested in OTR browser closing.
527 if (Source<Browser>(source)->profile() != this) 531 if (Source<Browser>(source)->profile() != this)
528 return; 532 return;
529 533
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
606 610
607 // The file_system context for this profile. 611 // The file_system context for this profile.
608 scoped_refptr<FileSystemHostContext> file_system_host_context_; 612 scoped_refptr<FileSystemHostContext> file_system_host_context_;
609 613
610 DISALLOW_COPY_AND_ASSIGN(OffTheRecordProfileImpl); 614 DISALLOW_COPY_AND_ASSIGN(OffTheRecordProfileImpl);
611 }; 615 };
612 616
613 Profile *Profile::CreateOffTheRecordProfile() { 617 Profile *Profile::CreateOffTheRecordProfile() {
614 return new OffTheRecordProfileImpl(this); 618 return new OffTheRecordProfileImpl(this);
615 } 619 }
OLDNEW
« no previous file with comments | « chrome/browser/download/save_file.cc ('k') | chrome/browser/profile_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698