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

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

Issue 2260443003: [Offline Pages] Clean up some constant value types for proposed_offline_id arg. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge Created 4 years, 3 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 | « no previous file | chrome/browser/android/offline_pages/offline_page_bridge.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 base::MakeUnique<offline_pages::OfflinePageMHTMLArchiver>(web_contents); 245 base::MakeUnique<offline_pages::OfflinePageMHTMLArchiver>(web_contents);
246 246
247 DownloadUIItem item; 247 DownloadUIItem item;
248 item.guid = client_id.id; 248 item.guid = client_id.id;
249 item.url = url; 249 item.url = url;
250 250
251 OfflinePageNotificationBridge bridge; 251 OfflinePageNotificationBridge bridge;
252 bridge.NotifyDownloadProgress(item); 252 bridge.NotifyDownloadProgress(item);
253 253
254 offline_page_model->SavePage( 254 offline_page_model->SavePage(
255 url, client_id, 0ul, std::move(archiver), 255 url, client_id, 0l, std::move(archiver),
256 base::Bind(&OfflinePageDownloadBridge::SavePageCallback, item)); 256 base::Bind(&OfflinePageDownloadBridge::SavePageCallback, item));
257 } 257 }
258 258
259 void OfflinePageDownloadBridge::CancelDownload( 259 void OfflinePageDownloadBridge::CancelDownload(
260 JNIEnv* env, 260 JNIEnv* env,
261 const JavaParamRef<jobject>& obj, 261 const JavaParamRef<jobject>& obj,
262 const JavaParamRef<jstring>& j_guid) { 262 const JavaParamRef<jstring>& j_guid) {
263 std::string guid = ConvertJavaStringToUTF8(env, j_guid); 263 std::string guid = ConvertJavaStringToUTF8(env, j_guid);
264 RequestCoordinator* coordinator = 264 RequestCoordinator* coordinator =
265 RequestCoordinatorFactory::GetForBrowserContext(browser_context_); 265 RequestCoordinatorFactory::GetForBrowserContext(browser_context_);
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 350
351 DownloadUIAdapter* adapter = 351 DownloadUIAdapter* adapter =
352 DownloadUIAdapter::FromOfflinePageModel(offline_page_model); 352 DownloadUIAdapter::FromOfflinePageModel(offline_page_model);
353 353
354 return reinterpret_cast<jlong>( 354 return reinterpret_cast<jlong>(
355 new OfflinePageDownloadBridge(env, obj, adapter, browser_context)); 355 new OfflinePageDownloadBridge(env, obj, adapter, browser_context));
356 } 356 }
357 357
358 } // namespace android 358 } // namespace android
359 } // namespace offline_pages 359 } // namespace offline_pages
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/android/offline_pages/offline_page_bridge.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698