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

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: Approach for writing to the file afterwards instead. 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 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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 const ScopedJavaGlobalRef<jobject>& j_callback_obj, 99 const ScopedJavaGlobalRef<jobject>& j_callback_obj,
100 const OfflinePageModel::MultipleOfflinePageItemResult& result) { 100 const OfflinePageModel::MultipleOfflinePageItemResult& result) {
101 JNIEnv* env = base::android::AttachCurrentThread(); 101 JNIEnv* env = base::android::AttachCurrentThread();
102 ToJavaOfflinePageList(env, j_result_obj.obj(), result); 102 ToJavaOfflinePageList(env, j_result_obj.obj(), result);
103 base::android::RunCallbackAndroid(j_callback_obj, j_result_obj); 103 base::android::RunCallbackAndroid(j_callback_obj, j_result_obj);
104 } 104 }
105 105
106 void SavePageCallback(const ScopedJavaGlobalRef<jobject>& j_callback_obj, 106 void SavePageCallback(const ScopedJavaGlobalRef<jobject>& j_callback_obj,
107 const GURL& url, 107 const GURL& url,
108 OfflinePageModel::SavePageResult result, 108 OfflinePageModel::SavePageResult result,
109 int64_t offline_id) { 109 int64_t offline_id,
110 const base::FilePath& saved_filepath) {
110 JNIEnv* env = base::android::AttachCurrentThread(); 111 JNIEnv* env = base::android::AttachCurrentThread();
111 112
112 Java_SavePageCallback_onSavePageDone( 113 Java_SavePageCallback_onSavePageDone(
113 env, j_callback_obj, static_cast<int>(result), 114 env, j_callback_obj, static_cast<int>(result),
114 ConvertUTF8ToJavaString(env, url.spec()), offline_id); 115 ConvertUTF8ToJavaString(env, url.spec()), offline_id);
115 } 116 }
116 117
117 void DeletePageCallback(const ScopedJavaGlobalRef<jobject>& j_callback_obj, 118 void DeletePageCallback(const ScopedJavaGlobalRef<jobject>& j_callback_obj,
118 OfflinePageModel::DeletePageResult result) { 119 OfflinePageModel::DeletePageResult result) {
119 base::android::RunCallbackAndroid(j_callback_obj, static_cast<int>(result)); 120 base::android::RunCallbackAndroid(j_callback_obj, static_cast<int>(result));
(...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after
584 env, ConvertUTF8ToJavaString(env, client_id.name_space), 585 env, ConvertUTF8ToJavaString(env, client_id.name_space),
585 ConvertUTF8ToJavaString(env, client_id.id)); 586 ConvertUTF8ToJavaString(env, client_id.id));
586 } 587 }
587 588
588 bool RegisterOfflinePageBridge(JNIEnv* env) { 589 bool RegisterOfflinePageBridge(JNIEnv* env) {
589 return RegisterNativesImpl(env); 590 return RegisterNativesImpl(env);
590 } 591 }
591 592
592 } // namespace android 593 } // namespace android
593 } // namespace offline_pages 594 } // namespace offline_pages
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698