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

Side by Side Diff: chrome/browser/download/chrome_download_manager_delegate.h

Issue 2479593006: Move enable extensions define to a build flag. (Closed)
Patch Set: Merge Created 4 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
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 #ifndef CHROME_BROWSER_DOWNLOAD_CHROME_DOWNLOAD_MANAGER_DELEGATE_H_ 5 #ifndef CHROME_BROWSER_DOWNLOAD_CHROME_DOWNLOAD_MANAGER_DELEGATE_H_
6 #define CHROME_BROWSER_DOWNLOAD_CHROME_DOWNLOAD_MANAGER_DELEGATE_H_ 6 #define CHROME_BROWSER_DOWNLOAD_CHROME_DOWNLOAD_MANAGER_DELEGATE_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
11 11
12 #include "base/compiler_specific.h" 12 #include "base/compiler_specific.h"
13 #include "base/containers/hash_tables.h" 13 #include "base/containers/hash_tables.h"
14 #include "base/macros.h" 14 #include "base/macros.h"
15 #include "base/memory/weak_ptr.h" 15 #include "base/memory/weak_ptr.h"
16 #include "chrome/browser/download/download_path_reservation_tracker.h" 16 #include "chrome/browser/download/download_path_reservation_tracker.h"
17 #include "chrome/browser/download/download_target_determiner_delegate.h" 17 #include "chrome/browser/download/download_target_determiner_delegate.h"
18 #include "chrome/browser/download/download_target_info.h" 18 #include "chrome/browser/download/download_target_info.h"
19 #include "chrome/browser/safe_browsing/download_protection_service.h" 19 #include "chrome/browser/safe_browsing/download_protection_service.h"
20 #include "content/public/browser/download_danger_type.h" 20 #include "content/public/browser/download_danger_type.h"
21 #include "content/public/browser/download_item.h" 21 #include "content/public/browser/download_item.h"
22 #include "content/public/browser/download_manager_delegate.h" 22 #include "content/public/browser/download_manager_delegate.h"
23 #include "content/public/browser/notification_observer.h" 23 #include "content/public/browser/notification_observer.h"
24 #include "content/public/browser/notification_registrar.h" 24 #include "content/public/browser/notification_registrar.h"
25 #include "extensions/features/features.h"
25 26
26 class DownloadPrefs; 27 class DownloadPrefs;
27 class Profile; 28 class Profile;
28 29
29 namespace content { 30 namespace content {
30 class DownloadManager; 31 class DownloadManager;
31 } 32 }
32 33
33 namespace extensions { 34 namespace extensions {
34 class CrxInstaller; 35 class CrxInstaller;
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 std::unique_ptr<DownloadTargetInfo> target_info); 159 std::unique_ptr<DownloadTargetInfo> target_info);
159 160
160 // Returns true if |path| should open in the browser. 161 // Returns true if |path| should open in the browser.
161 bool IsOpenInBrowserPreferreredForFile(const base::FilePath& path); 162 bool IsOpenInBrowserPreferreredForFile(const base::FilePath& path);
162 163
163 Profile* profile_; 164 Profile* profile_;
164 uint32_t next_download_id_; 165 uint32_t next_download_id_;
165 IdCallbackVector id_callbacks_; 166 IdCallbackVector id_callbacks_;
166 std::unique_ptr<DownloadPrefs> download_prefs_; 167 std::unique_ptr<DownloadPrefs> download_prefs_;
167 168
168 #if defined(ENABLE_EXTENSIONS) 169 #if BUILDFLAG(ENABLE_EXTENSIONS)
169 // Maps from pending extension installations to DownloadItem IDs. 170 // Maps from pending extension installations to DownloadItem IDs.
170 typedef base::hash_map<extensions::CrxInstaller*, 171 typedef base::hash_map<extensions::CrxInstaller*,
171 content::DownloadOpenDelayedCallback> CrxInstallerMap; 172 content::DownloadOpenDelayedCallback> CrxInstallerMap;
172 CrxInstallerMap crx_installers_; 173 CrxInstallerMap crx_installers_;
173 #endif 174 #endif
174 175
175 content::NotificationRegistrar registrar_; 176 content::NotificationRegistrar registrar_;
176 177
177 base::WeakPtrFactory<ChromeDownloadManagerDelegate> weak_ptr_factory_; 178 base::WeakPtrFactory<ChromeDownloadManagerDelegate> weak_ptr_factory_;
178 179
179 DISALLOW_COPY_AND_ASSIGN(ChromeDownloadManagerDelegate); 180 DISALLOW_COPY_AND_ASSIGN(ChromeDownloadManagerDelegate);
180 }; 181 };
181 182
182 #endif // CHROME_BROWSER_DOWNLOAD_CHROME_DOWNLOAD_MANAGER_DELEGATE_H_ 183 #endif // CHROME_BROWSER_DOWNLOAD_CHROME_DOWNLOAD_MANAGER_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698