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

Side by Side Diff: components/variations/service/variations_service.cc

Issue 1438123002: Removed callbacks to JNI functions + added gzip compressed seed support & pulling response time (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Implemented the rest TODOs: pulling time from response and GZIP compressed seed support Created 5 years, 1 month 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "components/variations/service/variations_service.h" 5 #include "components/variations/service/variations_service.h"
6 6
7 #include <vector>
8
9 #include "base/build_time.h" 7 #include "base/build_time.h"
10 #include "base/command_line.h" 8 #include "base/command_line.h"
11 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
12 #include "base/metrics/sparse_histogram.h" 10 #include "base/metrics/sparse_histogram.h"
13 #include "base/prefs/pref_registry_simple.h" 11 #include "base/prefs/pref_registry_simple.h"
14 #include "base/prefs/pref_service.h" 12 #include "base/prefs/pref_service.h"
15 #include "base/strings/string_util.h" 13 #include "base/strings/string_util.h"
16 #include "base/sys_info.h" 14 #include "base/sys_info.h"
17 #include "base/task_runner_util.h" 15 #include "base/task_runner_util.h"
18 #include "base/timer/elapsed_timer.h" 16 #include "base/timer/elapsed_timer.h"
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 create_trials_from_seed_called_(false), 281 create_trials_from_seed_called_(false),
284 initial_request_completed_(false), 282 initial_request_completed_(false),
285 disable_deltas_for_next_request_(false), 283 disable_deltas_for_next_request_(false),
286 resource_request_allowed_notifier_(notifier.Pass()), 284 resource_request_allowed_notifier_(notifier.Pass()),
287 request_count_(0), 285 request_count_(0),
288 weak_ptr_factory_(this) { 286 weak_ptr_factory_(this) {
289 DCHECK(client_.get()); 287 DCHECK(client_.get());
290 DCHECK(resource_request_allowed_notifier_.get()); 288 DCHECK(resource_request_allowed_notifier_.get());
291 289
292 resource_request_allowed_notifier_->Init(this); 290 resource_request_allowed_notifier_->Init(this);
293 seed_store_.SetVariationsFirstRunSeedCallback(
294 client_->GetVariationsFirstRunSeedCallback());
295 } 291 }
296 292
297 VariationsService::~VariationsService() { 293 VariationsService::~VariationsService() {
298 } 294 }
299 295
300 bool VariationsService::CreateTrialsFromSeed(base::FeatureList* feature_list) { 296 bool VariationsService::CreateTrialsFromSeed(base::FeatureList* feature_list) {
301 DCHECK(thread_checker_.CalledOnValidThread()); 297 DCHECK(thread_checker_.CalledOnValidThread());
302 298
303 create_trials_from_seed_called_ = true; 299 create_trials_from_seed_called_ = true;
304 300
(...skipping 552 matching lines...) Expand 10 before | Expand all | Expand 10 after
857 std::string stored_country; 853 std::string stored_country;
858 854
859 if (list_value->GetSize() == 2) { 855 if (list_value->GetSize() == 2) {
860 list_value->GetString(1, &stored_country); 856 list_value->GetString(1, &stored_country);
861 } 857 }
862 858
863 return stored_country; 859 return stored_country;
864 } 860 }
865 861
866 } // namespace variations 862 } // namespace variations
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698