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

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

Issue 839193002: Move ServiceAccessType into //components/keyed_service (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compilation on android Created 5 years, 11 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
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/download/download_service.h" 5 #include "chrome/browser/download/download_service.h"
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "chrome/browser/browser_process.h" 8 #include "chrome/browser/browser_process.h"
9 #include "chrome/browser/download/chrome_download_manager_delegate.h" 9 #include "chrome/browser/download/chrome_download_manager_delegate.h"
10 #include "chrome/browser/download/download_history.h" 10 #include "chrome/browser/download/download_history.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 50
51 manager_delegate_->SetDownloadManager(manager); 51 manager_delegate_->SetDownloadManager(manager);
52 52
53 #if defined(ENABLE_EXTENSIONS) 53 #if defined(ENABLE_EXTENSIONS)
54 extension_event_router_.reset( 54 extension_event_router_.reset(
55 new extensions::ExtensionDownloadsEventRouter(profile_, manager)); 55 new extensions::ExtensionDownloadsEventRouter(profile_, manager));
56 #endif 56 #endif
57 57
58 if (!profile_->IsOffTheRecord()) { 58 if (!profile_->IsOffTheRecord()) {
59 HistoryService* history = HistoryServiceFactory::GetForProfile( 59 HistoryService* history = HistoryServiceFactory::GetForProfile(
60 profile_, Profile::EXPLICIT_ACCESS); 60 profile_, ServiceAccessType::EXPLICIT_ACCESS);
61 history->GetNextDownloadId( 61 history->GetNextDownloadId(
62 manager_delegate_->GetDownloadIdReceiverCallback()); 62 manager_delegate_->GetDownloadIdReceiverCallback());
63 download_history_.reset(new DownloadHistory( 63 download_history_.reset(new DownloadHistory(
64 manager, 64 manager,
65 scoped_ptr<DownloadHistory::HistoryAdapter>( 65 scoped_ptr<DownloadHistory::HistoryAdapter>(
66 new DownloadHistory::HistoryAdapter(history)))); 66 new DownloadHistory::HistoryAdapter(history))));
67 } 67 }
68 68
69 // Pass an empty delegate when constructing the DownloadUIController. The 69 // Pass an empty delegate when constructing the DownloadUIController. The
70 // default delegate does all the notifications we need. 70 // default delegate does all the notifications we need.
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 // code) when the DownloadManager is shutting down. So we shut it down 171 // code) when the DownloadManager is shutting down. So we shut it down
172 // manually earlier. See http://crbug.com/131692 172 // manually earlier. See http://crbug.com/131692
173 BrowserContext::GetDownloadManager(profile_)->Shutdown(); 173 BrowserContext::GetDownloadManager(profile_)->Shutdown();
174 } 174 }
175 #if defined(ENABLE_EXTENSIONS) 175 #if defined(ENABLE_EXTENSIONS)
176 extension_event_router_.reset(); 176 extension_event_router_.reset();
177 #endif 177 #endif
178 manager_delegate_.reset(); 178 manager_delegate_.reset();
179 download_history_.reset(); 179 download_history_.reset();
180 } 180 }
OLDNEW
« no previous file with comments | « chrome/browser/download/download_browsertest.cc ('k') | chrome/browser/download/download_service_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698