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

Side by Side Diff: chrome/browser/android/offline_pages/offline_page_bridge.cc

Issue 2683493002: Get signals working in the EXTRA_DATA section of MHTML (Closed)
Patch Set: Created 3 years, 10 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 429 matching lines...) Expand 10 before | Expand all | Expand 10 after
440 if (web_contents) { 440 if (web_contents) {
441 save_page_params.url = web_contents->GetLastCommittedURL(); 441 save_page_params.url = web_contents->GetLastCommittedURL();
442 archiver.reset(new OfflinePageMHTMLArchiver(web_contents)); 442 archiver.reset(new OfflinePageMHTMLArchiver(web_contents));
443 } 443 }
444 444
445 save_page_params.client_id.name_space = 445 save_page_params.client_id.name_space =
446 ConvertJavaStringToUTF8(env, j_namespace); 446 ConvertJavaStringToUTF8(env, j_namespace);
447 save_page_params.client_id.id = ConvertJavaStringToUTF8(env, j_client_id); 447 save_page_params.client_id.id = ConvertJavaStringToUTF8(env, j_client_id);
448 save_page_params.is_background = false; 448 save_page_params.is_background = false;
449 449
450 std::vector<std::string> signal_data;
451
450 offline_page_model_->SavePage( 452 offline_page_model_->SavePage(
451 save_page_params, std::move(archiver), 453 save_page_params, std::move(archiver), signal_data,
452 base::Bind(&SavePageCallback, j_callback_ref, save_page_params.url)); 454 base::Bind(&SavePageCallback, j_callback_ref, save_page_params.url));
453 } 455 }
454 456
455 void OfflinePageBridge::SavePageLater(JNIEnv* env, 457 void OfflinePageBridge::SavePageLater(JNIEnv* env,
456 const JavaParamRef<jobject>& obj, 458 const JavaParamRef<jobject>& obj,
457 const JavaParamRef<jstring>& j_url, 459 const JavaParamRef<jstring>& j_url,
458 const JavaParamRef<jstring>& j_namespace, 460 const JavaParamRef<jstring>& j_namespace,
459 const JavaParamRef<jstring>& j_client_id, 461 const JavaParamRef<jstring>& j_client_id,
460 jboolean user_requested) { 462 jboolean user_requested) {
461 offline_pages::ClientId client_id; 463 offline_pages::ClientId client_id;
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
584 env, ConvertUTF8ToJavaString(env, client_id.name_space), 586 env, ConvertUTF8ToJavaString(env, client_id.name_space),
585 ConvertUTF8ToJavaString(env, client_id.id)); 587 ConvertUTF8ToJavaString(env, client_id.id));
586 } 588 }
587 589
588 bool RegisterOfflinePageBridge(JNIEnv* env) { 590 bool RegisterOfflinePageBridge(JNIEnv* env) {
589 return RegisterNativesImpl(env); 591 return RegisterNativesImpl(env);
590 } 592 }
591 593
592 } // namespace android 594 } // namespace android
593 } // namespace offline_pages 595 } // namespace offline_pages
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698