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/bookmarks/bookmark_bar_model.h" | |
10 #include "chrome/browser/browser_process.h" | 9 #include "chrome/browser/browser_process.h" |
11 #include "chrome/browser/google_util.h" | 10 #include "chrome/browser/google_util.h" |
12 #include "chrome/browser/profile.h" | 11 #include "chrome/browser/profile.h" |
13 #include "chrome/browser/template_url_model.h" | 12 #include "chrome/browser/template_url_model.h" |
14 #include "chrome/common/json_value_serializer.h" | 13 #include "chrome/common/json_value_serializer.h" |
15 #include "chrome/common/l10n_util.h" | 14 #include "chrome/common/l10n_util.h" |
16 #include "chrome/common/pref_names.h" | 15 #include "chrome/common/pref_names.h" |
17 #include "chrome/common/pref_service.h" | 16 #include "chrome/common/pref_service.h" |
18 #include "googleurl/src/url_util.h" | 17 #include "googleurl/src/url_util.h" |
19 #include "net/base/escape.h" | 18 #include "net/base/escape.h" |
(...skipping 563 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
583 const size_t after_slashes = std::min(url->length(), | 582 const size_t after_slashes = std::min(url->length(), |
584 static_cast<size_t>(scheme.end() + 3)); | 583 static_cast<size_t>(scheme.end() + 3)); |
585 while ((prefix_len < after_slashes) && ((*url)[prefix_len] == L'/')) | 584 while ((prefix_len < after_slashes) && ((*url)[prefix_len] == L'/')) |
586 ++prefix_len; | 585 ++prefix_len; |
587 if (prefix_len == url->length()) | 586 if (prefix_len == url->length()) |
588 url->clear(); | 587 url->clear(); |
589 else | 588 else |
590 url->erase(url->begin(), url->begin() + prefix_len); | 589 url->erase(url->begin(), url->begin() + prefix_len); |
591 return prefix_len; | 590 return prefix_len; |
592 } | 591 } |
OLD | NEW |