OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #include "chrome/browser/google/google_url_tracker.h" | 5 #include "chrome/browser/google/google_url_tracker.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
11 #include "base/string_util.h" | 11 #include "base/string_util.h" |
12 #include "base/utf_string_conversions.h" | 12 #include "base/utf_string_conversions.h" |
13 #include "chrome/browser/browser_process.h" | 13 #include "chrome/browser/browser_process.h" |
14 #include "chrome/browser/prefs/pref_service.h" | 14 #include "chrome/browser/prefs/pref_service.h" |
15 #include "chrome/browser/profiles/profile.h" | 15 #include "chrome/browser/profiles/profile.h" |
16 #include "chrome/browser/search_engines/template_url.h" | 16 #include "chrome/browser/search_engines/template_url.h" |
17 #include "chrome/browser/tab_contents/navigation_controller.h" | |
18 #include "chrome/browser/tab_contents/tab_contents.h" | |
19 #include "chrome/common/chrome_switches.h" | 17 #include "chrome/common/chrome_switches.h" |
20 #include "chrome/common/notification_service.h" | 18 #include "chrome/common/notification_service.h" |
21 #include "chrome/common/pref_names.h" | 19 #include "chrome/common/pref_names.h" |
| 20 #include "content/browser/tab_contents/navigation_controller.h" |
| 21 #include "content/browser/tab_contents/tab_contents.h" |
22 #include "grit/generated_resources.h" | 22 #include "grit/generated_resources.h" |
23 #include "net/base/load_flags.h" | 23 #include "net/base/load_flags.h" |
24 #include "net/url_request/url_request_status.h" | 24 #include "net/url_request/url_request_status.h" |
25 #include "ui/base/l10n/l10n_util.h" | 25 #include "ui/base/l10n/l10n_util.h" |
26 | 26 |
27 namespace { | 27 namespace { |
28 | 28 |
29 InfoBarDelegate* CreateInfobar(TabContents* tab_contents, | 29 InfoBarDelegate* CreateInfobar(TabContents* tab_contents, |
30 GoogleURLTracker* google_url_tracker, | 30 GoogleURLTracker* google_url_tracker, |
31 const GURL& new_google_url) { | 31 const GURL& new_google_url) { |
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
367 } | 367 } |
368 | 368 |
369 void GoogleURLTracker::ShowGoogleURLInfoBarIfNecessary( | 369 void GoogleURLTracker::ShowGoogleURLInfoBarIfNecessary( |
370 TabContents* tab_contents) { | 370 TabContents* tab_contents) { |
371 if (!need_to_prompt_) | 371 if (!need_to_prompt_) |
372 return; | 372 return; |
373 DCHECK(!fetched_google_url_.is_empty()); | 373 DCHECK(!fetched_google_url_.is_empty()); |
374 | 374 |
375 infobar_ = (*infobar_creator_)(tab_contents, this, fetched_google_url_); | 375 infobar_ = (*infobar_creator_)(tab_contents, this, fetched_google_url_); |
376 } | 376 } |
OLD | NEW |