OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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_URL_TRACKER_H_ | 5 #ifndef CHROME_BROWSER_GOOGLE_URL_TRACKER_H_ |
6 #define CHROME_BROWSER_GOOGLE_URL_TRACKER_H_ | 6 #define CHROME_BROWSER_GOOGLE_URL_TRACKER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/gtest_prod_util.h" | 11 #include "base/gtest_prod_util.h" |
12 #include "base/scoped_ptr.h" | 12 #include "base/scoped_ptr.h" |
13 #include "chrome/common/net/url_fetcher.h" | 13 #include "chrome/common/net/url_fetcher.h" |
| 14 #include "chrome/common/notification_observer.h" |
14 #include "chrome/common/notification_registrar.h" | 15 #include "chrome/common/notification_registrar.h" |
15 #include "googleurl/src/gurl.h" | 16 #include "googleurl/src/gurl.h" |
16 | 17 |
17 class PrefService; | 18 class PrefService; |
18 | 19 |
19 // This object is responsible for updating the Google URL at most once per run, | 20 // This object is responsible for updating the Google URL at most once per run, |
20 // and tracking the currently known value, which is also saved to a pref. | 21 // and tracking the currently known value, which is also saved to a pref. |
21 // | 22 // |
22 // Most consumers should only call GoogleURL(), which is guaranteed to | 23 // Most consumers should only call GoogleURL(), which is guaranteed to |
23 // synchronously return a value at all times (even during startup or in unittest | 24 // synchronously return a value at all times (even during startup or in unittest |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 // bother to fetch anything. | 106 // bother to fetch anything. |
106 bool request_context_available_; | 107 bool request_context_available_; |
107 // True when the profile has been loaded and the | 108 // True when the profile has been loaded and the |
108 // default request context created, so we can | 109 // default request context created, so we can |
109 // actually do the fetch with the right data. | 110 // actually do the fetch with the right data. |
110 | 111 |
111 DISALLOW_COPY_AND_ASSIGN(GoogleURLTracker); | 112 DISALLOW_COPY_AND_ASSIGN(GoogleURLTracker); |
112 }; | 113 }; |
113 | 114 |
114 #endif // CHROME_BROWSER_GOOGLE_URL_TRACKER_H_ | 115 #endif // CHROME_BROWSER_GOOGLE_URL_TRACKER_H_ |
OLD | NEW |