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

Side by Side Diff: chrome/browser/android/download/download_manager_service.cc

Issue 2374853002: remove DownloadController::SetDefaultDownloadFileName() (Closed)
Patch Set: rebase to fix merge errors Created 4 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
« no previous file with comments | « chrome/browser/android/download/download_controller_base.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/android/download/download_manager_service.h" 5 #include "chrome/browser/android/download/download_manager_service.h"
6 6
7 #include "base/android/jni_string.h" 7 #include "base/android/jni_string.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "base/single_thread_task_runner.h" 9 #include "base/single_thread_task_runner.h"
10 #include "base/threading/thread_task_runner_handle.h" 10 #include "base/threading/thread_task_runner_handle.h"
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 : is_history_query_complete_(false), 104 : is_history_query_complete_(false),
105 pending_get_downloads_actions_(NONE) { 105 pending_get_downloads_actions_(NONE) {
106 } 106 }
107 107
108 DownloadManagerService::~DownloadManagerService() {} 108 DownloadManagerService::~DownloadManagerService() {}
109 109
110 void DownloadManagerService::Init( 110 void DownloadManagerService::Init(
111 JNIEnv* env, 111 JNIEnv* env,
112 jobject obj) { 112 jobject obj) {
113 java_ref_.Reset(env, obj); 113 java_ref_.Reset(env, obj);
114 DownloadControllerBase::Get()->SetDefaultDownloadFileName(
115 l10n_util::GetStringUTF8(IDS_DEFAULT_DOWNLOAD_FILENAME));
116 } 114 }
117 115
118 void DownloadManagerService::ResumeDownload( 116 void DownloadManagerService::ResumeDownload(
119 JNIEnv* env, 117 JNIEnv* env,
120 jobject obj, 118 jobject obj,
121 const JavaParamRef<jstring>& jdownload_guid, 119 const JavaParamRef<jstring>& jdownload_guid,
122 bool is_off_the_record) { 120 bool is_off_the_record) {
123 std::string download_guid = ConvertJavaStringToUTF8(env, jdownload_guid); 121 std::string download_guid = ConvertJavaStringToUTF8(env, jdownload_guid);
124 if (is_history_query_complete_ || is_off_the_record) 122 if (is_history_query_complete_ || is_off_the_record)
125 ResumeDownloadInternal(download_guid, is_off_the_record); 123 ResumeDownloadInternal(download_guid, is_off_the_record);
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
436 content::DownloadManager* manager = 434 content::DownloadManager* manager =
437 content::BrowserContext::GetDownloadManager(profile); 435 content::BrowserContext::GetDownloadManager(profile);
438 436
439 // Update notifiers to monitor any newly created DownloadManagers. 437 // Update notifiers to monitor any newly created DownloadManagers.
440 updateNotifier( 438 updateNotifier(
441 this, manager, 439 this, manager,
442 is_off_the_record ? off_the_record_notifier_ : original_notifier_); 440 is_off_the_record ? off_the_record_notifier_ : original_notifier_);
443 441
444 return manager; 442 return manager;
445 } 443 }
OLDNEW
« no previous file with comments | « chrome/browser/android/download/download_controller_base.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698