OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/search_engines/keyword_editor_controller.h" | 5 #include "chrome/browser/search_engines/keyword_editor_controller.h" |
6 | 6 |
7 #include "base/utf_string_conversions.h" | 7 #include "base/utf_string_conversions.h" |
8 #include "chrome/browser/metrics/user_metrics.h" | 8 #include "chrome/browser/metrics/user_metrics.h" |
9 #include "chrome/browser/prefs/pref_service.h" | 9 #include "chrome/browser/prefs/pref_service.h" |
10 #include "chrome/browser/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
11 #include "chrome/browser/search_engines/template_url.h" | 11 #include "chrome/browser/search_engines/template_url.h" |
12 #include "chrome/browser/search_engines/template_url_model.h" | 12 #include "chrome/browser/search_engines/template_url_model.h" |
13 #include "chrome/browser/search_engines/template_url_table_model.h" | 13 #include "chrome/browser/search_engines/template_url_table_model.h" |
14 #include "chrome/common/pref_names.h" | 14 #include "chrome/common/pref_names.h" |
15 | 15 |
16 KeywordEditorController::KeywordEditorController(Profile* profile) | 16 KeywordEditorController::KeywordEditorController(Profile* profile) |
17 : profile_(profile) { | 17 : profile_(profile) { |
18 table_model_.reset(new TemplateURLTableModel(profile->GetTemplateURLModel())); | 18 table_model_.reset(new TemplateURLTableModel(profile->GetTemplateURLModel())); |
19 } | 19 } |
20 | 20 |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 return url_model()->loaded(); | 105 return url_model()->loaded(); |
106 } | 106 } |
107 | 107 |
108 const TemplateURL* KeywordEditorController::GetTemplateURL(int index) const { | 108 const TemplateURL* KeywordEditorController::GetTemplateURL(int index) const { |
109 return &table_model_->GetTemplateURL(index); | 109 return &table_model_->GetTemplateURL(index); |
110 } | 110 } |
111 | 111 |
112 TemplateURLModel* KeywordEditorController::url_model() const { | 112 TemplateURLModel* KeywordEditorController::url_model() const { |
113 return table_model_->template_url_model(); | 113 return table_model_->template_url_model(); |
114 } | 114 } |
OLD | NEW |