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

Side by Side Diff: chrome/browser/android/offline_pages/downloads/offline_page_download_bridge.cc

Issue 2721553004: Remove auto raw pointer deduction from non-linux specific code. (Closed)
Patch Set: Created 3 years, 9 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/offline_pages/downloads/offline_page_download_b ridge.h" 5 #include "chrome/browser/android/offline_pages/downloads/offline_page_download_b ridge.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/android/jni_string.h" 9 #include "base/android/jni_string.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 Profile::FromBrowserContext(web_contents->GetBrowserContext()) 206 Profile::FromBrowserContext(web_contents->GetBrowserContext())
207 ->GetOriginalProfile(), 207 ->GetOriginalProfile(),
208 kDownloadNamespace, original_url, 208 kDownloadNamespace, original_url,
209 base::Bind(&RequestQueueDuplicateCheckDone, original_url, j_tab_ref)); 209 base::Bind(&RequestQueueDuplicateCheckDone, original_url, j_tab_ref));
210 } 210 }
211 211
212 void ToJavaOfflinePageDownloadItemList( 212 void ToJavaOfflinePageDownloadItemList(
213 JNIEnv* env, 213 JNIEnv* env,
214 jobject j_result_obj, 214 jobject j_result_obj,
215 const std::vector<const DownloadUIItem*>& items) { 215 const std::vector<const DownloadUIItem*>& items) {
216 for (const auto item : items) { 216 for (auto* item : items) {
danakj 2017/02/28 15:33:29 const auto*?
vmpstr 2017/02/28 21:48:27 Done.
217 Java_OfflinePageDownloadBridge_createDownloadItemAndAddToList( 217 Java_OfflinePageDownloadBridge_createDownloadItemAndAddToList(
218 env, j_result_obj, ConvertUTF8ToJavaString(env, item->guid), 218 env, j_result_obj, ConvertUTF8ToJavaString(env, item->guid),
219 ConvertUTF8ToJavaString(env, item->url.spec()), item->download_state, 219 ConvertUTF8ToJavaString(env, item->url.spec()), item->download_state,
220 item->download_progress_bytes, 220 item->download_progress_bytes,
221 ConvertUTF16ToJavaString(env, item->title), 221 ConvertUTF16ToJavaString(env, item->title),
222 ConvertUTF8ToJavaString(env, item->target_path.value()), 222 ConvertUTF8ToJavaString(env, item->target_path.value()),
223 item->start_time.ToJavaTime(), item->total_bytes); 223 item->start_time.ToJavaTime(), item->total_bytes);
224 } 224 }
225 } 225 }
226 226
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
488 base::MakeUnique<DownloadUIAdapterDelegate>(offline_page_model)); 488 base::MakeUnique<DownloadUIAdapterDelegate>(offline_page_model));
489 offline_page_model->SetUserData(kDownloadUIAdapterKey, adapter); 489 offline_page_model->SetUserData(kDownloadUIAdapterKey, adapter);
490 } 490 }
491 491
492 return reinterpret_cast<jlong>( 492 return reinterpret_cast<jlong>(
493 new OfflinePageDownloadBridge(env, obj, adapter, browser_context)); 493 new OfflinePageDownloadBridge(env, obj, adapter, browser_context));
494 } 494 }
495 495
496 } // namespace android 496 } // namespace android
497 } // namespace offline_pages 497 } // namespace offline_pages
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698