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/edit_search_engine_controller.h" | 5 #include "chrome/browser/search_engines/edit_search_engine_controller.h" |
6 | 6 |
7 #include "base/string_util.h" | 7 #include "base/string_util.h" |
8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
9 #include "chrome/browser/metrics/user_metrics.h" | 9 #include "chrome/browser/metrics/user_metrics.h" |
10 #include "chrome/browser/net/url_fixer_upper.h" | 10 #include "chrome/browser/net/url_fixer_upper.h" |
11 #include "chrome/browser/profile.h" | 11 #include "chrome/browser/profiles/profile.h" |
12 #include "chrome/browser/search_engines/template_url.h" | 12 #include "chrome/browser/search_engines/template_url.h" |
13 #include "chrome/browser/search_engines/template_url_model.h" | 13 #include "chrome/browser/search_engines/template_url_model.h" |
14 #include "googleurl/src/gurl.h" | 14 #include "googleurl/src/gurl.h" |
15 | 15 |
16 EditSearchEngineController::EditSearchEngineController( | 16 EditSearchEngineController::EditSearchEngineController( |
17 const TemplateURL* template_url, | 17 const TemplateURL* template_url, |
18 EditSearchEngineControllerDelegate* edit_keyword_delegate, | 18 EditSearchEngineControllerDelegate* edit_keyword_delegate, |
19 Profile* profile) | 19 Profile* profile) |
20 : template_url_(template_url), | 20 : template_url_(template_url), |
21 edit_keyword_delegate_(edit_keyword_delegate), | 21 edit_keyword_delegate_(edit_keyword_delegate), |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 std::string scheme( | 140 std::string scheme( |
141 URLFixerUpper::SegmentURL(expanded_url, &parts)); | 141 URLFixerUpper::SegmentURL(expanded_url, &parts)); |
142 if (!parts.scheme.is_valid()) { | 142 if (!parts.scheme.is_valid()) { |
143 scheme.append("://"); | 143 scheme.append("://"); |
144 url.insert(0, scheme); | 144 url.insert(0, scheme); |
145 } | 145 } |
146 | 146 |
147 return url; | 147 return url; |
148 } | 148 } |
149 | 149 |
OLD | NEW |