OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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/autocomplete/search_provider.h" | 5 #include "chrome/browser/autocomplete/search_provider.h" |
6 | 6 |
7 #include "base/message_loop.h" | 7 #include "base/message_loop.h" |
8 #include "base/string_util.h" | 8 #include "base/string_util.h" |
9 #include "chrome/browser/bookmark_bar_model.h" | 9 #include "chrome/browser/bookmarks/bookmark_bar_model.h" |
10 #include "chrome/browser/browser_process.h" | 10 #include "chrome/browser/browser_process.h" |
11 #include "chrome/browser/google_util.h" | 11 #include "chrome/browser/google_util.h" |
12 #include "chrome/browser/profile.h" | 12 #include "chrome/browser/profile.h" |
13 #include "chrome/browser/template_url_model.h" | 13 #include "chrome/browser/template_url_model.h" |
14 #include "chrome/common/json_value_serializer.h" | 14 #include "chrome/common/json_value_serializer.h" |
15 #include "chrome/common/l10n_util.h" | 15 #include "chrome/common/l10n_util.h" |
16 #include "chrome/common/pref_names.h" | 16 #include "chrome/common/pref_names.h" |
17 #include "chrome/common/pref_service.h" | 17 #include "chrome/common/pref_service.h" |
18 #include "googleurl/src/url_util.h" | 18 #include "googleurl/src/url_util.h" |
19 #include "net/base/escape.h" | 19 #include "net/base/escape.h" |
(...skipping 533 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
553 static_cast<size_t>(scheme.end() + 3)); | 553 static_cast<size_t>(scheme.end() + 3)); |
554 while ((prefix_len < after_slashes) && ((*url)[prefix_len] == L'/')) | 554 while ((prefix_len < after_slashes) && ((*url)[prefix_len] == L'/')) |
555 ++prefix_len; | 555 ++prefix_len; |
556 if (prefix_len == url->length()) | 556 if (prefix_len == url->length()) |
557 url->clear(); | 557 url->clear(); |
558 else | 558 else |
559 url->erase(url->begin(), url->begin() + prefix_len); | 559 url->erase(url->begin(), url->begin() + prefix_len); |
560 return prefix_len; | 560 return prefix_len; |
561 } | 561 } |
562 | 562 |
OLD | NEW |