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

Side by Side Diff: chrome/browser/metrics/variations/variations_service.cc

Issue 1117703002: Adjust URLFetcher::Create API so that object is returned as scoped_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove unneeded Pass() calls Created 5 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 | « chrome/browser/media/webrtc_log_uploader.cc ('k') | chrome/browser/net/sdch_browsertest.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 (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 "chrome/browser/metrics/variations/variations_service.h" 5 #include "chrome/browser/metrics/variations/variations_service.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/build_time.h" 9 #include "base/build_time.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after
439 } 439 }
440 #endif 440 #endif
441 result.reset(new VariationsService( 441 result.reset(new VariationsService(
442 new web_resource::ResourceRequestAllowedNotifier( 442 new web_resource::ResourceRequestAllowedNotifier(
443 local_state, switches::kDisableBackgroundNetworking), 443 local_state, switches::kDisableBackgroundNetworking),
444 local_state, state_manager)); 444 local_state, state_manager));
445 return result.Pass(); 445 return result.Pass();
446 } 446 }
447 447
448 void VariationsService::DoActualFetch() { 448 void VariationsService::DoActualFetch() {
449 pending_seed_request_.reset(net::URLFetcher::Create( 449 pending_seed_request_ = net::URLFetcher::Create(0, variations_server_url_,
450 0, variations_server_url_, net::URLFetcher::GET, this)); 450 net::URLFetcher::GET, this);
451 pending_seed_request_->SetLoadFlags(net::LOAD_DO_NOT_SEND_COOKIES | 451 pending_seed_request_->SetLoadFlags(net::LOAD_DO_NOT_SEND_COOKIES |
452 net::LOAD_DO_NOT_SAVE_COOKIES); 452 net::LOAD_DO_NOT_SAVE_COOKIES);
453 pending_seed_request_->SetRequestContext( 453 pending_seed_request_->SetRequestContext(
454 g_browser_process->system_request_context()); 454 g_browser_process->system_request_context());
455 pending_seed_request_->SetMaxRetriesOn5xx(kMaxRetrySeedFetch); 455 pending_seed_request_->SetMaxRetriesOn5xx(kMaxRetrySeedFetch);
456 if (!seed_store_.variations_serial_number().empty()) { 456 if (!seed_store_.variations_serial_number().empty()) {
457 pending_seed_request_->AddExtraRequestHeader( 457 pending_seed_request_->AddExtraRequestHeader(
458 "If-Match:" + seed_store_.variations_serial_number()); 458 "If-Match:" + seed_store_.variations_serial_number());
459 } 459 }
460 pending_seed_request_->Start(); 460 pending_seed_request_->Start();
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
640 local_state_->SetInt64(prefs::kVariationsLastFetchTime, 640 local_state_->SetInt64(prefs::kVariationsLastFetchTime,
641 base::Time::Now().ToInternalValue()); 641 base::Time::Now().ToInternalValue());
642 } 642 }
643 } 643 }
644 644
645 std::string VariationsService::GetInvalidVariationsSeedSignature() const { 645 std::string VariationsService::GetInvalidVariationsSeedSignature() const {
646 return seed_store_.GetInvalidSignature(); 646 return seed_store_.GetInvalidSignature();
647 } 647 }
648 648
649 } // namespace chrome_variations 649 } // namespace chrome_variations
OLDNEW
« no previous file with comments | « chrome/browser/media/webrtc_log_uploader.cc ('k') | chrome/browser/net/sdch_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698