| OLD | NEW |
| 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 #ifndef CHROME_BROWSER_GOOGLE_GOOGLE_URL_TRACKER_H_ | 5 #ifndef CHROME_BROWSER_GOOGLE_GOOGLE_URL_TRACKER_H_ |
| 6 #define CHROME_BROWSER_GOOGLE_GOOGLE_URL_TRACKER_H_ | 6 #define CHROME_BROWSER_GOOGLE_GOOGLE_URL_TRACKER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 scoped_ptr<GoogleURLTrackerNavigationHelper> nav_helper_; | 177 scoped_ptr<GoogleURLTrackerNavigationHelper> nav_helper_; |
| 178 | 178 |
| 179 // Creates an infobar and adds it to the provided InfoBarService. Returns the | 179 // Creates an infobar and adds it to the provided InfoBarService. Returns the |
| 180 // infobar on success or NULL on failure. The caller does not own the | 180 // infobar on success or NULL on failure. The caller does not own the |
| 181 // returned object, the InfoBarService does. | 181 // returned object, the InfoBarService does. |
| 182 base::Callback<InfoBar*(InfoBarService*, GoogleURLTracker*, const GURL&)> | 182 base::Callback<InfoBar*(InfoBarService*, GoogleURLTracker*, const GURL&)> |
| 183 infobar_creator_; | 183 infobar_creator_; |
| 184 | 184 |
| 185 GURL google_url_; | 185 GURL google_url_; |
| 186 GURL fetched_google_url_; | 186 GURL fetched_google_url_; |
| 187 base::WeakPtrFactory<GoogleURLTracker> weak_ptr_factory_; | |
| 188 scoped_ptr<net::URLFetcher> fetcher_; | 187 scoped_ptr<net::URLFetcher> fetcher_; |
| 189 int fetcher_id_; | 188 int fetcher_id_; |
| 190 bool in_startup_sleep_; // True if we're in the five-second "no fetching" | 189 bool in_startup_sleep_; // True if we're in the five-second "no fetching" |
| 191 // period that begins at browser start. | 190 // period that begins at browser start. |
| 192 bool already_fetched_; // True if we've already fetched a URL once this run; | 191 bool already_fetched_; // True if we've already fetched a URL once this run; |
| 193 // we won't fetch again until after a restart. | 192 // we won't fetch again until after a restart. |
| 194 bool need_to_fetch_; // True if a consumer actually wants us to fetch an | 193 bool need_to_fetch_; // True if a consumer actually wants us to fetch an |
| 195 // updated URL. If this is never set, we won't | 194 // updated URL. If this is never set, we won't |
| 196 // bother to fetch anything. | 195 // bother to fetch anything. |
| 197 // Consumers should observe | 196 // Consumers should observe |
| 198 // chrome::NOTIFICATION_GOOGLE_URL_UPDATED. | 197 // chrome::NOTIFICATION_GOOGLE_URL_UPDATED. |
| 199 bool need_to_prompt_; // True if the last fetched Google URL is not | 198 bool need_to_prompt_; // True if the last fetched Google URL is not |
| 200 // matched with current user's default Google URL | 199 // matched with current user's default Google URL |
| 201 // nor the last prompted Google URL. | 200 // nor the last prompted Google URL. |
| 202 bool search_committed_; // True when we're expecting a notification of a new | 201 bool search_committed_; // True when we're expecting a notification of a new |
| 203 // pending search navigation. | 202 // pending search navigation. |
| 204 EntryMap entry_map_; | 203 EntryMap entry_map_; |
| 204 base::WeakPtrFactory<GoogleURLTracker> weak_ptr_factory_; |
| 205 | 205 |
| 206 DISALLOW_COPY_AND_ASSIGN(GoogleURLTracker); | 206 DISALLOW_COPY_AND_ASSIGN(GoogleURLTracker); |
| 207 }; | 207 }; |
| 208 | 208 |
| 209 #endif // CHROME_BROWSER_GOOGLE_GOOGLE_URL_TRACKER_H_ | 209 #endif // CHROME_BROWSER_GOOGLE_GOOGLE_URL_TRACKER_H_ |
| OLD | NEW |