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

Side by Side Diff: chrome/browser/android/offline_pages/offline_page_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
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/offline_pages/offline_page_bridge.h" 5 #include "chrome/browser/android/offline_pages/offline_page_bridge.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after
425 if (web_contents) { 425 if (web_contents) {
426 url = web_contents->GetLastCommittedURL(); 426 url = web_contents->GetLastCommittedURL();
427 archiver.reset(new OfflinePageMHTMLArchiver(web_contents)); 427 archiver.reset(new OfflinePageMHTMLArchiver(web_contents));
428 } 428 }
429 429
430 offline_pages::ClientId client_id; 430 offline_pages::ClientId client_id;
431 client_id.name_space = ConvertJavaStringToUTF8(env, j_namespace); 431 client_id.name_space = ConvertJavaStringToUTF8(env, j_namespace);
432 client_id.id = ConvertJavaStringToUTF8(env, j_client_id); 432 client_id.id = ConvertJavaStringToUTF8(env, j_client_id);
433 433
434 offline_page_model_->SavePage( 434 offline_page_model_->SavePage(
435 url, client_id, 0ul, std::move(archiver), 435 url, client_id, 0l, std::move(archiver),
436 base::Bind(&SavePageCallback, j_callback_ref, url)); 436 base::Bind(&SavePageCallback, j_callback_ref, url));
437 } 437 }
438 438
439 void OfflinePageBridge::SavePageLater(JNIEnv* env, 439 void OfflinePageBridge::SavePageLater(JNIEnv* env,
440 const JavaParamRef<jobject>& obj, 440 const JavaParamRef<jobject>& obj,
441 const JavaParamRef<jstring>& j_url, 441 const JavaParamRef<jstring>& j_url,
442 const JavaParamRef<jstring>& j_namespace, 442 const JavaParamRef<jstring>& j_namespace,
443 const JavaParamRef<jstring>& j_client_id, 443 const JavaParamRef<jstring>& j_client_id,
444 jboolean user_requested) { 444 jboolean user_requested) {
445 offline_pages::ClientId client_id; 445 offline_pages::ClientId client_id;
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
539 env, ConvertUTF8ToJavaString(env, client_id.name_space), 539 env, ConvertUTF8ToJavaString(env, client_id.name_space),
540 ConvertUTF8ToJavaString(env, client_id.id)); 540 ConvertUTF8ToJavaString(env, client_id.id));
541 } 541 }
542 542
543 bool RegisterOfflinePageBridge(JNIEnv* env) { 543 bool RegisterOfflinePageBridge(JNIEnv* env) {
544 return RegisterNativesImpl(env); 544 return RegisterNativesImpl(env);
545 } 545 }
546 546
547 } // namespace android 547 } // namespace android
548 } // namespace offline_pages 548 } // namespace offline_pages
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698