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

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

Issue 8493017: Cleanup extension permissions module. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 9 years 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/chrome_download_manager_delegate.h" 5 #include "chrome/browser/download/chrome_download_manager_delegate.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 10 matching lines...) Expand all
21 #include "chrome/browser/download/download_util.h" 21 #include "chrome/browser/download/download_util.h"
22 #include "chrome/browser/download/save_package_file_picker.h" 22 #include "chrome/browser/download/save_package_file_picker.h"
23 #include "chrome/browser/extensions/crx_installer.h" 23 #include "chrome/browser/extensions/crx_installer.h"
24 #include "chrome/browser/extensions/extension_service.h" 24 #include "chrome/browser/extensions/extension_service.h"
25 #include "chrome/browser/prefs/pref_member.h" 25 #include "chrome/browser/prefs/pref_member.h"
26 #include "chrome/browser/prefs/pref_service.h" 26 #include "chrome/browser/prefs/pref_service.h"
27 #include "chrome/browser/profiles/profile.h" 27 #include "chrome/browser/profiles/profile.h"
28 #include "chrome/browser/safe_browsing/safe_browsing_service.h" 28 #include "chrome/browser/safe_browsing/safe_browsing_service.h"
29 #include "chrome/browser/ui/browser.h" 29 #include "chrome/browser/ui/browser.h"
30 #include "chrome/browser/ui/browser_list.h" 30 #include "chrome/browser/ui/browser_list.h"
31 #include "chrome/common/chrome_notification_types.h"
31 #include "chrome/common/chrome_paths.h" 32 #include "chrome/common/chrome_paths.h"
32 #include "chrome/common/extensions/user_script.h" 33 #include "chrome/common/extensions/user_script.h"
33 #include "chrome/common/pref_names.h" 34 #include "chrome/common/pref_names.h"
34 #include "content/browser/download/download_file.h" 35 #include "content/browser/download/download_file.h"
35 #include "content/browser/download/download_item.h" 36 #include "content/browser/download/download_item.h"
36 #include "content/browser/download/download_manager.h" 37 #include "content/browser/download/download_manager.h"
37 #include "content/browser/download/download_status_updater.h" 38 #include "content/browser/download/download_status_updater.h"
38 #include "content/browser/tab_contents/tab_contents.h" 39 #include "content/browser/tab_contents/tab_contents.h"
39 #include "content/public/browser/notification_source.h" 40 #include "content/public/browser/notification_source.h"
40 #include "grit/generated_resources.h" 41 #include "grit/generated_resources.h"
(...skipping 563 matching lines...) Expand 10 before | Expand all | Expand 10 after
604 int32 download_id, int64 db_handle) { 605 int32 download_id, int64 db_handle) {
605 // It's not immediately obvious, but HistoryBackend::CreateDownload() can 606 // It's not immediately obvious, but HistoryBackend::CreateDownload() can
606 // call this function with an invalid |db_handle|. For instance, this can 607 // call this function with an invalid |db_handle|. For instance, this can
607 // happen when the history database is offline. We cannot have multiple 608 // happen when the history database is offline. We cannot have multiple
608 // DownloadItems with the same invalid db_handle, so we need to assign a 609 // DownloadItems with the same invalid db_handle, so we need to assign a
609 // unique |db_handle| here. 610 // unique |db_handle| here.
610 if (db_handle == DownloadItem::kUninitializedHandle) 611 if (db_handle == DownloadItem::kUninitializedHandle)
611 db_handle = download_history_->GetNextFakeDbHandle(); 612 db_handle = download_history_->GetNextFakeDbHandle();
612 download_manager_->OnItemAddedToPersistentStore(download_id, db_handle); 613 download_manager_->OnItemAddedToPersistentStore(download_id, db_handle);
613 } 614 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698