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

Side by Side Diff: chrome/browser/android/offline_pages/evaluation/offline_page_evaluation_bridge.cc

Issue 2858073002: Use constexpr TaskTraits constructor in chrome. (Closed)
Patch Set: Created 3 years, 7 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_model_factory.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/evaluation/offline_page_evaluatio n_bridge.h" 5 #include "chrome/browser/android/offline_pages/evaluation/offline_page_evaluatio n_bridge.h"
6 6
7 #include "base/android/callback_android.h" 7 #include "base/android/callback_android.h"
8 #include "base/android/jni_android.h" 8 #include "base/android/jni_android.h"
9 #include "base/android/jni_array.h" 9 #include "base/android/jni_array.h"
10 #include "base/android/jni_string.h" 10 #include "base/android/jni_string.h"
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 const MultipleItemStatuses& removed_request_results) { 124 const MultipleItemStatuses& removed_request_results) {
125 base::android::RunCallbackAndroid(j_callback_obj, 125 base::android::RunCallbackAndroid(j_callback_obj,
126 int(removed_request_results.size())); 126 int(removed_request_results.size()));
127 } 127 }
128 128
129 std::unique_ptr<KeyedService> GetTestingRequestCoordinator( 129 std::unique_ptr<KeyedService> GetTestingRequestCoordinator(
130 content::BrowserContext* context, 130 content::BrowserContext* context,
131 std::unique_ptr<OfflinerPolicy> policy, 131 std::unique_ptr<OfflinerPolicy> policy,
132 std::unique_ptr<Offliner> offliner) { 132 std::unique_ptr<Offliner> offliner) {
133 scoped_refptr<base::SequencedTaskRunner> background_task_runner = 133 scoped_refptr<base::SequencedTaskRunner> background_task_runner =
134 base::CreateSequencedTaskRunnerWithTraits(base::TaskTraits().MayBlock()); 134 base::CreateSequencedTaskRunnerWithTraits({base::MayBlock()});
135 Profile* profile = Profile::FromBrowserContext(context); 135 Profile* profile = Profile::FromBrowserContext(context);
136 base::FilePath queue_store_path = 136 base::FilePath queue_store_path =
137 profile->GetPath().Append(chrome::kOfflinePageRequestQueueDirname); 137 profile->GetPath().Append(chrome::kOfflinePageRequestQueueDirname);
138 138
139 std::unique_ptr<RequestQueueStoreSQL> queue_store( 139 std::unique_ptr<RequestQueueStoreSQL> queue_store(
140 new RequestQueueStoreSQL(background_task_runner, queue_store_path)); 140 new RequestQueueStoreSQL(background_task_runner, queue_store_path));
141 std::unique_ptr<RequestQueue> queue(new RequestQueue(std::move(queue_store))); 141 std::unique_ptr<RequestQueue> queue(new RequestQueue(std::move(queue_store)));
142 std::unique_ptr<android::EvaluationTestScheduler> scheduler( 142 std::unique_ptr<android::EvaluationTestScheduler> scheduler(
143 new android::EvaluationTestScheduler()); 143 new android::EvaluationTestScheduler());
144 net::NetworkQualityEstimator::NetworkQualityProvider* 144 net::NetworkQualityEstimator::NetworkQualityProvider*
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
382 return; 382 return;
383 JNIEnv* env = base::android::AttachCurrentThread(); 383 JNIEnv* env = base::android::AttachCurrentThread();
384 ScopedJavaLocalRef<jobject> obj = weak_java_ref_.get(env); 384 ScopedJavaLocalRef<jobject> obj = weak_java_ref_.get(env);
385 if (obj.is_null()) 385 if (obj.is_null())
386 return; 386 return;
387 Java_OfflinePageEvaluationBridge_offlinePageModelLoaded(env, obj); 387 Java_OfflinePageEvaluationBridge_offlinePageModelLoaded(env, obj);
388 } 388 }
389 389
390 } // namespace android 390 } // namespace android
391 } // namespace offline_pages 391 } // namespace offline_pages
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/android/offline_pages/offline_page_model_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698