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

Side by Side Diff: components/google/core/browser/google_url_tracker.cc

Issue 544833002: Apply the network changed retry (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/google/core/browser/google_url_tracker.h" 5 #include "components/google/core/browser/google_url_tracker.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/prefs/pref_service.h" 9 #include "base/prefs/pref_service.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 ++fetcher_id_; 238 ++fetcher_id_;
239 // We don't want this fetch to set new entries in the cache or cookies, lest 239 // We don't want this fetch to set new entries in the cache or cookies, lest
240 // we alarm the user. 240 // we alarm the user.
241 fetcher_->SetLoadFlags(net::LOAD_DISABLE_CACHE | 241 fetcher_->SetLoadFlags(net::LOAD_DISABLE_CACHE |
242 net::LOAD_DO_NOT_SAVE_COOKIES); 242 net::LOAD_DO_NOT_SAVE_COOKIES);
243 fetcher_->SetRequestContext(client_->GetRequestContext()); 243 fetcher_->SetRequestContext(client_->GetRequestContext());
244 244
245 // Configure to max_retries at most kMaxRetries times for 5xx errors. 245 // Configure to max_retries at most kMaxRetries times for 5xx errors.
246 static const int kMaxRetries = 5; 246 static const int kMaxRetries = 5;
247 fetcher_->SetMaxRetriesOn5xx(kMaxRetries); 247 fetcher_->SetMaxRetriesOn5xx(kMaxRetries);
248 // Configure to max_retries at most kMaxRetries times for network changes.
pauljensen 2014/09/05 13:22:56 What is "max_retries"? would "retry" make more se
Jaekyun Seok (inactive) 2014/09/05 19:00:50 Done.
249 fetcher_->SetAutomaticallyRetryOnNetworkChanges(kMaxRetries);
248 250
249 fetcher_->Start(); 251 fetcher_->Start();
250 } 252 }
251 253
252 void GoogleURLTracker::OnNavigationPending( 254 void GoogleURLTracker::OnNavigationPending(
253 scoped_ptr<GoogleURLTrackerNavigationHelper> nav_helper, 255 scoped_ptr<GoogleURLTrackerNavigationHelper> nav_helper,
254 infobars::InfoBarManager* infobar_manager, 256 infobars::InfoBarManager* infobar_manager,
255 int pending_id) { 257 int pending_id) {
256 GoogleURLTrackerMapEntry* map_entry = NULL; 258 GoogleURLTrackerMapEntry* map_entry = NULL;
257 259
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
394 } 396 }
395 if (client_->IsListeningForNavigationStart()) { 397 if (client_->IsListeningForNavigationStart()) {
396 DCHECK(!search_committed_); 398 DCHECK(!search_committed_);
397 client_->SetListeningForNavigationStart(false); 399 client_->SetListeningForNavigationStart(false);
398 } 400 }
399 } 401 }
400 402
401 void GoogleURLTracker::NotifyGoogleURLUpdated() { 403 void GoogleURLTracker::NotifyGoogleURLUpdated() {
402 callback_list_.Notify(); 404 callback_list_.Notify();
403 } 405 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698