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

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

Issue 10857031: Move PrefMember and PrefChangeRegistrar to api directory. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to parent Created 8 years, 4 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) 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/chrome_download_manager_delegate.h" 5 #include "chrome/browser/download/chrome_download_manager_delegate.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
11 #include "base/callback.h" 11 #include "base/callback.h"
12 #include "base/file_util.h" 12 #include "base/file_util.h"
13 #include "base/rand_util.h" 13 #include "base/rand_util.h"
14 #include "base/stringprintf.h" 14 #include "base/stringprintf.h"
15 #include "base/time.h" 15 #include "base/time.h"
16 #include "base/utf_string_conversions.h" 16 #include "base/utf_string_conversions.h"
17 #include "chrome/browser/api/prefs/pref_member.h"
17 #include "chrome/browser/browser_process.h" 18 #include "chrome/browser/browser_process.h"
18 #include "chrome/browser/download/download_completion_blocker.h" 19 #include "chrome/browser/download/download_completion_blocker.h"
19 #include "chrome/browser/download/download_crx_util.h" 20 #include "chrome/browser/download/download_crx_util.h"
20 #include "chrome/browser/download/download_extensions.h" 21 #include "chrome/browser/download/download_extensions.h"
21 #include "chrome/browser/download/download_file_picker.h" 22 #include "chrome/browser/download/download_file_picker.h"
22 #include "chrome/browser/download/download_history.h" 23 #include "chrome/browser/download/download_history.h"
24 #include "chrome/browser/download/download_path_reservation_tracker.h"
23 #include "chrome/browser/download/download_prefs.h" 25 #include "chrome/browser/download/download_prefs.h"
24 #include "chrome/browser/download/download_path_reservation_tracker.h"
25 #include "chrome/browser/download/download_status_updater.h" 26 #include "chrome/browser/download/download_status_updater.h"
26 #include "chrome/browser/download/download_util.h" 27 #include "chrome/browser/download/download_util.h"
27 #include "chrome/browser/download/save_package_file_picker.h" 28 #include "chrome/browser/download/save_package_file_picker.h"
28 #include "chrome/browser/extensions/api/downloads/downloads_api.h" 29 #include "chrome/browser/extensions/api/downloads/downloads_api.h"
29 #include "chrome/browser/extensions/crx_installer.h" 30 #include "chrome/browser/extensions/crx_installer.h"
30 #include "chrome/browser/extensions/extension_service.h" 31 #include "chrome/browser/extensions/extension_service.h"
31 #include "chrome/browser/prefs/pref_member.h"
32 #include "chrome/browser/prefs/pref_service.h" 32 #include "chrome/browser/prefs/pref_service.h"
33 #include "chrome/browser/profiles/profile.h" 33 #include "chrome/browser/profiles/profile.h"
34 #include "chrome/browser/safe_browsing/safe_browsing_service.h" 34 #include "chrome/browser/safe_browsing/safe_browsing_service.h"
35 #include "chrome/browser/ui/browser_tabstrip.h" 35 #include "chrome/browser/ui/browser_tabstrip.h"
36 #include "chrome/common/chrome_notification_types.h" 36 #include "chrome/common/chrome_notification_types.h"
37 #include "chrome/common/extensions/extension_switch_utils.h" 37 #include "chrome/common/extensions/extension_switch_utils.h"
38 #include "chrome/common/extensions/user_script.h" 38 #include "chrome/common/extensions/user_script.h"
39 #include "chrome/common/pref_names.h" 39 #include "chrome/common/pref_names.h"
40 #include "content/public/browser/download_item.h" 40 #include "content/public/browser/download_item.h"
41 #include "content/public/browser/download_manager.h" 41 #include "content/public/browser/download_manager.h"
(...skipping 814 matching lines...) Expand 10 before | Expand all | Expand 10 after
856 int32 download_id, int64 db_handle) { 856 int32 download_id, int64 db_handle) {
857 // It's not immediately obvious, but HistoryBackend::CreateDownload() can 857 // It's not immediately obvious, but HistoryBackend::CreateDownload() can
858 // call this function with an invalid |db_handle|. For instance, this can 858 // call this function with an invalid |db_handle|. For instance, this can
859 // happen when the history database is offline. We cannot have multiple 859 // happen when the history database is offline. We cannot have multiple
860 // DownloadItems with the same invalid db_handle, so we need to assign a 860 // DownloadItems with the same invalid db_handle, so we need to assign a
861 // unique |db_handle| here. 861 // unique |db_handle| here.
862 if (db_handle == DownloadItem::kUninitializedHandle) 862 if (db_handle == DownloadItem::kUninitializedHandle)
863 db_handle = download_history_->GetNextFakeDbHandle(); 863 db_handle = download_history_->GetNextFakeDbHandle();
864 download_manager_->OnItemAddedToPersistentStore(download_id, db_handle); 864 download_manager_->OnItemAddedToPersistentStore(download_id, db_handle);
865 } 865 }
OLDNEW
« no previous file with comments | « chrome/browser/content_settings/host_content_settings_map.h ('k') | chrome/browser/download/download_prefs.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698