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

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

Issue 2799083003: Replace manual GoogleURLTracker update request with call to utility function. (Closed)
Patch Set: Remove unneeded #includes Created 3 years, 8 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 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 #ifndef COMPONENTS_GOOGLE_CORE_BROWSER_GOOGLE_URL_TRACKER_H_ 5 #ifndef COMPONENTS_GOOGLE_CORE_BROWSER_GOOGLE_URL_TRACKER_H_
6 #define COMPONENTS_GOOGLE_CORE_BROWSER_GOOGLE_URL_TRACKER_H_ 6 #define COMPONENTS_GOOGLE_CORE_BROWSER_GOOGLE_URL_TRACKER_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/callback_forward.h" 10 #include "base/callback_forward.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 ~GoogleURLTracker() override; 58 ~GoogleURLTracker() override;
59 59
60 // Register user preferences for GoogleURLTracker. 60 // Register user preferences for GoogleURLTracker.
61 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); 61 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry);
62 62
63 63
64 // Returns the current Google homepage URL. 64 // Returns the current Google homepage URL.
65 const GURL& google_url() const { return google_url_; } 65 const GURL& google_url() const { return google_url_; }
66 66
67 // Requests that the tracker perform a server check to update the Google URL 67 // Requests that the tracker perform a server check to update the Google URL
68 // as necessary. If |force| is false, this will happen at most once per 68 // as necessary. This will happen at most once per network change, not sooner
69 // network change, not sooner than five seconds after startup (checks 69 // than five seconds after startup (checks requested before that time will
70 // requested before that time will occur then; checks requested afterwards 70 // occur then; checks requested afterwards will occur immediately, if no other
71 // will occur immediately, if no other checks have been made during this run). 71 // checks have been made during this run).
72 // If |force| is true, and the tracker has already performed any requested 72 void RequestServerCheck();
73 // check, it will check again.
74 void RequestServerCheck(bool force);
75 73
76 std::unique_ptr<Subscription> RegisterCallback( 74 std::unique_ptr<Subscription> RegisterCallback(
77 const OnGoogleURLUpdatedCallback& cb); 75 const OnGoogleURLUpdatedCallback& cb);
78 76
79 private: 77 private:
80 friend class GoogleURLTrackerTest; 78 friend class GoogleURLTrackerTest;
81 friend class SyncTest; 79 friend class SyncTest;
82 80
83 static const char kSearchDomainCheckURL[]; 81 static const char kSearchDomainCheckURL[];
84 82
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 // updated URL. If this is never set, we won't 116 // updated URL. If this is never set, we won't
119 // bother to fetch anything. 117 // bother to fetch anything.
120 // Consumers should register a callback via 118 // Consumers should register a callback via
121 // RegisterCallback(). 119 // RegisterCallback().
122 base::WeakPtrFactory<GoogleURLTracker> weak_ptr_factory_; 120 base::WeakPtrFactory<GoogleURLTracker> weak_ptr_factory_;
123 121
124 DISALLOW_COPY_AND_ASSIGN(GoogleURLTracker); 122 DISALLOW_COPY_AND_ASSIGN(GoogleURLTracker);
125 }; 123 };
126 124
127 #endif // COMPONENTS_GOOGLE_CORE_BROWSER_GOOGLE_URL_TRACKER_H_ 125 #endif // COMPONENTS_GOOGLE_CORE_BROWSER_GOOGLE_URL_TRACKER_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/navigation_correction_tab_observer.cc ('k') | components/google/core/browser/google_url_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698