| 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 | 169 |
| 170 Profile* profile_; | 170 Profile* profile_; |
| 171 content::NotificationRegistrar registrar_; | 171 content::NotificationRegistrar registrar_; |
| 172 InfoBarCreator infobar_creator_; | 172 InfoBarCreator infobar_creator_; |
| 173 // TODO(ukai): GoogleURLTracker should track google domain (e.g. google.co.uk) | 173 // TODO(ukai): GoogleURLTracker should track google domain (e.g. google.co.uk) |
| 174 // rather than URL (e.g. http://www.google.co.uk/), so that user could | 174 // rather than URL (e.g. http://www.google.co.uk/), so that user could |
| 175 // configure to use https in search engine templates. | 175 // configure to use https in search engine templates. |
| 176 GURL google_url_; | 176 GURL google_url_; |
| 177 GURL fetched_google_url_; | 177 GURL fetched_google_url_; |
| 178 base::WeakPtrFactory<GoogleURLTracker> weak_ptr_factory_; | 178 base::WeakPtrFactory<GoogleURLTracker> weak_ptr_factory_; |
| 179 scoped_ptr<content::URLFetcher> fetcher_; | 179 scoped_ptr<net::URLFetcher> fetcher_; |
| 180 int fetcher_id_; | 180 int fetcher_id_; |
| 181 bool in_startup_sleep_; // True if we're in the five-second "no fetching" | 181 bool in_startup_sleep_; // True if we're in the five-second "no fetching" |
| 182 // period that begins at browser start. | 182 // period that begins at browser start. |
| 183 bool already_fetched_; // True if we've already fetched a URL once this run; | 183 bool already_fetched_; // True if we've already fetched a URL once this run; |
| 184 // we won't fetch again until after a restart. | 184 // we won't fetch again until after a restart. |
| 185 bool need_to_fetch_; // True if a consumer actually wants us to fetch an | 185 bool need_to_fetch_; // True if a consumer actually wants us to fetch an |
| 186 // updated URL. If this is never set, we won't | 186 // updated URL. If this is never set, we won't |
| 187 // bother to fetch anything. | 187 // bother to fetch anything. |
| 188 // Consumers should observe | 188 // Consumers should observe |
| 189 // chrome::GOOGLE_URL_UPDATED. | 189 // chrome::GOOGLE_URL_UPDATED. |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 232 | 232 |
| 233 private: | 233 private: |
| 234 // ConfirmInfoBarDelegate: | 234 // ConfirmInfoBarDelegate: |
| 235 virtual string16 GetMessageText() const OVERRIDE; | 235 virtual string16 GetMessageText() const OVERRIDE; |
| 236 virtual string16 GetButtonLabel(InfoBarButton button) const OVERRIDE; | 236 virtual string16 GetButtonLabel(InfoBarButton button) const OVERRIDE; |
| 237 | 237 |
| 238 DISALLOW_COPY_AND_ASSIGN(GoogleURLTrackerInfoBarDelegate); | 238 DISALLOW_COPY_AND_ASSIGN(GoogleURLTrackerInfoBarDelegate); |
| 239 }; | 239 }; |
| 240 | 240 |
| 241 #endif // CHROME_BROWSER_GOOGLE_GOOGLE_URL_TRACKER_H_ | 241 #endif // CHROME_BROWSER_GOOGLE_GOOGLE_URL_TRACKER_H_ |
| OLD | NEW |