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 #include "chrome/browser/ui/android/tab_model/tab_model.h" | 5 #include "chrome/browser/ui/android/tab_model/tab_model.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "chrome/browser/browser_process.h" | 8 #include "chrome/browser/browser_process.h" |
9 #include "chrome/browser/chrome_notification_types.h" | 9 #include "chrome/browser/chrome_notification_types.h" |
10 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 // constructor that takes a Profile* argument. See crbug.com/159704. | 78 // constructor that takes a Profile* argument. See crbug.com/159704. |
79 // NOTREACHED(); | 79 // NOTREACHED(); |
80 } | 80 } |
81 } | 81 } |
82 | 82 |
83 ToolbarModel* TabModel::GetToolbarModel() { | 83 ToolbarModel* TabModel::GetToolbarModel() { |
84 return toolbar_model_.get(); | 84 return toolbar_model_.get(); |
85 } | 85 } |
86 | 86 |
87 string16 TabModel::GetSearchTermsForCurrentTab() { | 87 string16 TabModel::GetSearchTermsForCurrentTab() { |
88 return toolbar_model_->GetText(true); | 88 return toolbar_model_->GetText(); |
89 } | 89 } |
90 | 90 |
91 std::string TabModel::GetQueryExtractionParam() { | 91 std::string TabModel::GetQueryExtractionParam() { |
92 if (!profile_) | 92 if (!profile_) |
93 return std::string(); | 93 return std::string(); |
94 UIThreadSearchTermsData search_terms_data(profile_); | 94 UIThreadSearchTermsData search_terms_data(profile_); |
95 return search_terms_data.InstantExtendedEnabledParam(); | 95 return search_terms_data.InstantExtendedEnabledParam(); |
96 } | 96 } |
97 | 97 |
98 string16 TabModel::GetCorpusNameForCurrentTab() { | 98 string16 TabModel::GetCorpusNameForCurrentTab() { |
(...skipping 17 matching lines...) Expand all Loading... |
116 if (is_off_the_record_) { | 116 if (is_off_the_record_) { |
117 Profile* profile = content::Source<Profile>(source).ptr(); | 117 Profile* profile = content::Source<Profile>(source).ptr(); |
118 if (profile && profile->IsOffTheRecord()) | 118 if (profile && profile->IsOffTheRecord()) |
119 profile_ = profile; | 119 profile_ = profile; |
120 } | 120 } |
121 break; | 121 break; |
122 default: | 122 default: |
123 NOTREACHED(); | 123 NOTREACHED(); |
124 } | 124 } |
125 } | 125 } |
OLD | NEW |