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

Side by Side Diff: chrome/browser/history/history_backend.cc

Issue 6043: Added dangerous download prompting. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years, 2 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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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/history/history_backend.h" 5 #include "chrome/browser/history/history_backend.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/histogram.h" 10 #include "base/histogram.h"
(...skipping 916 matching lines...) Expand 10 before | Expand all | Expand 10 after
927 } 927 }
928 928
929 // Update a particular download entry. 929 // Update a particular download entry.
930 void HistoryBackend::UpdateDownload(int64 received_bytes, 930 void HistoryBackend::UpdateDownload(int64 received_bytes,
931 int32 state, 931 int32 state,
932 int64 db_handle) { 932 int64 db_handle) {
933 if (db_.get()) 933 if (db_.get())
934 db_->UpdateDownload(received_bytes, state, db_handle); 934 db_->UpdateDownload(received_bytes, state, db_handle);
935 } 935 }
936 936
937 // Update the path of a particular download entry.
938 void HistoryBackend::UpdateDownloadPath(const std::wstring& path,
939 int64 db_handle) {
940 if (db_.get())
941 db_->UpdateDownloadPath(path, db_handle);
942 }
943
937 // Create a new download entry and pass back the db_handle to it. 944 // Create a new download entry and pass back the db_handle to it.
938 void HistoryBackend::CreateDownload( 945 void HistoryBackend::CreateDownload(
939 scoped_refptr<DownloadCreateRequest> request, 946 scoped_refptr<DownloadCreateRequest> request,
940 const DownloadCreateInfo& create_info) { 947 const DownloadCreateInfo& create_info) {
941 int64 db_handle = 0; 948 int64 db_handle = 0;
942 if (!request->canceled()) { 949 if (!request->canceled()) {
943 if (db_.get()) 950 if (db_.get())
944 db_handle = db_->CreateDownload(create_info); 951 db_handle = db_->CreateDownload(create_info);
945 request->ForwardResult(DownloadCreateRequest::TupleType(create_info, 952 request->ForwardResult(DownloadCreateRequest::TupleType(create_info,
946 db_handle)); 953 db_handle));
(...skipping 872 matching lines...) Expand 10 before | Expand all | Expand 10 after
1819 } 1826 }
1820 1827
1821 BookmarkService* HistoryBackend::GetBookmarkService() { 1828 BookmarkService* HistoryBackend::GetBookmarkService() {
1822 if (bookmark_service_) 1829 if (bookmark_service_)
1823 bookmark_service_->BlockTillLoaded(); 1830 bookmark_service_->BlockTillLoaded();
1824 return bookmark_service_; 1831 return bookmark_service_;
1825 } 1832 }
1826 1833
1827 } // namespace history 1834 } // namespace history
1828 1835
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698