| 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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 | 87 |
| 88 // Notifies the tracker that the user has started a Google search. | 88 // Notifies the tracker that the user has started a Google search. |
| 89 // If prompting is necessary, we then listen for the subsequent pending | 89 // If prompting is necessary, we then listen for the subsequent pending |
| 90 // navigation to get the appropriate NavigationController. When the load | 90 // navigation to get the appropriate NavigationController. When the load |
| 91 // commits, we'll show the infobar. | 91 // commits, we'll show the infobar. |
| 92 // | 92 // |
| 93 // When |profile| is NULL or a testing profile, this function does nothing. | 93 // When |profile| is NULL or a testing profile, this function does nothing. |
| 94 static void GoogleURLSearchCommitted(Profile* profile); | 94 static void GoogleURLSearchCommitted(Profile* profile); |
| 95 | 95 |
| 96 // No one but GoogleURLTrackerInfoBarDelegate or test code should call these. | 96 // No one but GoogleURLTrackerInfoBarDelegate or test code should call these. |
| 97 void AcceptGoogleURL(bool redo_searches); | 97 void AcceptGoogleURL(); |
| 98 void CancelGoogleURL(); | 98 void CancelGoogleURL(); |
| 99 const GURL& google_url() const { return google_url_; } | 99 const GURL& google_url() const { return google_url_; } |
| 100 const GURL& fetched_google_url() const { return fetched_google_url_; } | 100 const GURL& fetched_google_url() const { return fetched_google_url_; } |
| 101 | 101 |
| 102 // No one but GoogleURLTrackerMapEntry should call this. | 102 // No one but GoogleURLTrackerMapEntry should call this. |
| 103 void DeleteMapEntryForService(const InfoBarService* infobar_service); | 103 void DeleteMapEntryForService(const InfoBarService* infobar_service); |
| 104 | 104 |
| 105 // Called by the navigation observer after SearchCommitted() registers | 105 // Called by the navigation observer after SearchCommitted() registers |
| 106 // listeners, to indicate that we've received the "load now pending" | 106 // listeners, to indicate that we've received the "load now pending" |
| 107 // notification. |navigation_controller| is the NavigationController for this | 107 // notification. |navigation_controller| is the NavigationController for this |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 204 // nor the last prompted Google URL. | 204 // nor the last prompted Google URL. |
| 205 bool search_committed_; // True when we're expecting a notification of a new | 205 bool search_committed_; // True when we're expecting a notification of a new |
| 206 // pending search navigation. | 206 // pending search navigation. |
| 207 EntryMap entry_map_; | 207 EntryMap entry_map_; |
| 208 base::WeakPtrFactory<GoogleURLTracker> weak_ptr_factory_; | 208 base::WeakPtrFactory<GoogleURLTracker> weak_ptr_factory_; |
| 209 | 209 |
| 210 DISALLOW_COPY_AND_ASSIGN(GoogleURLTracker); | 210 DISALLOW_COPY_AND_ASSIGN(GoogleURLTracker); |
| 211 }; | 211 }; |
| 212 | 212 |
| 213 #endif // CHROME_BROWSER_GOOGLE_GOOGLE_URL_TRACKER_H_ | 213 #endif // CHROME_BROWSER_GOOGLE_GOOGLE_URL_TRACKER_H_ |
| OLD | NEW |