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

Side by Side Diff: chrome/browser/extensions/api/downloads/downloads_api.cc

Issue 1977623002: Updates to DownloadUrlParameters in preparation for OOPIF changes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge Created 4 years, 7 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/extensions/api/downloads/downloads_api.h" 5 #include "chrome/browser/extensions/api/downloads/downloads_api.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 945 matching lines...) Expand 10 before | Expand all | Expand 10 after
956 if (include_incognito() && GetProfile()->HasOffTheRecordProfile()) 956 if (include_incognito() && GetProfile()->HasOffTheRecordProfile())
957 current_profile = GetProfile()->GetOffTheRecordProfile(); 957 current_profile = GetProfile()->GetOffTheRecordProfile();
958 958
959 content::StoragePartition* storage_partition = 959 content::StoragePartition* storage_partition =
960 BrowserContext::GetStoragePartition( 960 BrowserContext::GetStoragePartition(
961 render_frame_host()->GetProcess()->GetBrowserContext(), 961 render_frame_host()->GetProcess()->GetBrowserContext(),
962 render_frame_host()->GetSiteInstance()); 962 render_frame_host()->GetSiteInstance());
963 std::unique_ptr<content::DownloadUrlParameters> download_params( 963 std::unique_ptr<content::DownloadUrlParameters> download_params(
964 new content::DownloadUrlParameters( 964 new content::DownloadUrlParameters(
965 download_url, render_frame_host()->GetProcess()->GetID(), 965 download_url, render_frame_host()->GetProcess()->GetID(),
966 render_view_host_do_not_use()->GetRoutingID(), 966 render_frame_host()->GetRenderViewHost()->GetRoutingID(),
967 render_frame_host()->GetRoutingID(), 967 render_frame_host()->GetRoutingID(),
968 storage_partition->GetURLRequestContext())); 968 storage_partition->GetURLRequestContext()));
969 969
970 base::FilePath creator_suggested_filename; 970 base::FilePath creator_suggested_filename;
971 if (options.filename.get()) { 971 if (options.filename.get()) {
972 #if defined(OS_WIN) 972 #if defined(OS_WIN)
973 // Can't get filename16 from options.ToValue() because that converts it from 973 // Can't get filename16 from options.ToValue() because that converts it from
974 // std::string. 974 // std::string.
975 base::DictionaryValue* options_value = NULL; 975 base::DictionaryValue* options_value = NULL;
976 EXTENSION_FUNCTION_VALIDATE(args_->GetDictionary(0, &options_value)); 976 EXTENSION_FUNCTION_VALIDATE(args_->GetDictionary(0, &options_value));
(...skipping 923 matching lines...) Expand 10 before | Expand all | Expand 10 after
1900 return; 1900 return;
1901 base::Time now(base::Time::Now()); 1901 base::Time now(base::Time::Now());
1902 int delta = now.ToTimeT() - last_checked_removal_.ToTimeT(); 1902 int delta = now.ToTimeT() - last_checked_removal_.ToTimeT();
1903 if (delta <= kFileExistenceRateLimitSeconds) 1903 if (delta <= kFileExistenceRateLimitSeconds)
1904 return; 1904 return;
1905 last_checked_removal_ = now; 1905 last_checked_removal_ = now;
1906 manager->CheckForHistoryFilesRemoval(); 1906 manager->CheckForHistoryFilesRemoval();
1907 } 1907 }
1908 1908
1909 } // namespace extensions 1909 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698