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

Side by Side Diff: chrome/browser/download/download_manager.cc

Issue 7464009: Removal of Profile from content part 1. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: works now Created 9 years, 5 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/download/download_manager.h" 5 #include "chrome/browser/download/download_manager.h"
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/i18n/case_conversion.h" 9 #include "base/i18n/case_conversion.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 1004 matching lines...) Expand 10 before | Expand all | Expand 10 after
1015 // reference, so that a copy of the object isn't made. 1015 // reference, so that a copy of the object isn't made.
1016 BrowserThread::PostTask(BrowserThread::IO, FROM_HERE, 1016 BrowserThread::PostTask(BrowserThread::IO, FROM_HERE,
1017 NewRunnableFunction(&download_util::DownloadUrl, 1017 NewRunnableFunction(&download_util::DownloadUrl,
1018 url, 1018 url,
1019 referrer, 1019 referrer,
1020 referrer_charset, 1020 referrer_charset,
1021 save_info, 1021 save_info,
1022 g_browser_process->resource_dispatcher_host(), 1022 g_browser_process->resource_dispatcher_host(),
1023 tab_contents->GetRenderProcessHost()->id(), 1023 tab_contents->GetRenderProcessHost()->id(),
1024 tab_contents->render_view_host()->routing_id(), 1024 tab_contents->render_view_host()->routing_id(),
1025 &tab_contents->profile()->GetResourceContext())); 1025 &tab_contents->context()->GetResourceContext()));
1026 } 1026 }
1027 1027
1028 void DownloadManager::AddObserver(Observer* observer) { 1028 void DownloadManager::AddObserver(Observer* observer) {
1029 observers_.AddObserver(observer); 1029 observers_.AddObserver(observer);
1030 observer->ModelChanged(); 1030 observer->ModelChanged();
1031 } 1031 }
1032 1032
1033 void DownloadManager::RemoveObserver(Observer* observer) { 1033 void DownloadManager::RemoveObserver(Observer* observer) {
1034 observers_.RemoveObserver(observer); 1034 observers_.RemoveObserver(observer);
1035 } 1035 }
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
1346 observed_download_manager_->RemoveObserver(this); 1346 observed_download_manager_->RemoveObserver(this);
1347 } 1347 }
1348 1348
1349 void DownloadManager::OtherDownloadManagerObserver::ModelChanged() { 1349 void DownloadManager::OtherDownloadManagerObserver::ModelChanged() {
1350 observing_download_manager_->NotifyModelChanged(); 1350 observing_download_manager_->NotifyModelChanged();
1351 } 1351 }
1352 1352
1353 void DownloadManager::OtherDownloadManagerObserver::ManagerGoingDown() { 1353 void DownloadManager::OtherDownloadManagerObserver::ManagerGoingDown() {
1354 observed_download_manager_ = NULL; 1354 observed_download_manager_ = NULL;
1355 } 1355 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698