summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormsw@chromium.org <msw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-16 05:38:02 +0000
committermsw@chromium.org <msw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-16 05:38:02 +0000
commitd0f6098101a099139d8e366dd32264704108b633 (patch)
tree4dde268b89516adfa62aaf6f103756e80e2f16bf
parent8cfbdbd7534b215061982816b5af8a0eb4a7dff2 (diff)
downloadchromium_src-d0f6098101a099139d8e366dd32264704108b633.zip
chromium_src-d0f6098101a099139d8e366dd32264704108b633.tar.gz
chromium_src-d0f6098101a099139d8e366dd32264704108b633.tar.bz2
Update BuiltinProvider to provide chrome:// URLs.
Provide common URLs as users start typing "about://" or "chrome://". Highlight matching input (including "chrome://" for "about:" input). Support settings sub-pages/paths, e.g. "chrome://settings/foo". Add BuiltinProviderTest unit test. Additional hosts will be added when I fix crbug.com/73926. BUG=55771 TEST=Get chrome:// AutocompleteProvider URLs in the omnibox dropdown. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=89073 Review URL: http://codereview.chromium.org/6995096 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89298 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/autocomplete/builtin_provider.cc107
-rw-r--r--chrome/browser/autocomplete/builtin_provider.h8
-rw-r--r--chrome/browser/autocomplete/builtin_provider_unittest.cc231
-rw-r--r--chrome/browser/browser_about_handler.cc6
-rw-r--r--chrome/chrome_tests.gypi1
-rw-r--r--chrome/common/url_constants.cc1
-rw-r--r--chrome/common/url_constants.h1
-rw-r--r--ui/gfx/canvas.h4
8 files changed, 335 insertions, 24 deletions
diff --git a/chrome/browser/autocomplete/builtin_provider.cc b/chrome/browser/autocomplete/builtin_provider.cc
index 507d9ed..7fb5159 100644
--- a/chrome/browser/autocomplete/builtin_provider.cc
+++ b/chrome/browser/autocomplete/builtin_provider.cc
@@ -6,9 +6,35 @@
#include "base/string_util.h"
#include "base/utf_string_conversions.h"
-#include "chrome/browser/autocomplete/autocomplete_match.h"
#include "chrome/browser/browser_about_handler.h"
#include "chrome/browser/net/url_fixer_upper.h"
+#include "chrome/common/url_constants.h"
+
+namespace {
+
+// This list should be kept in sync with chrome/common/url_constants.h.
+const char* kChromeSettingsSubPages[] = {
+ chrome::kAdvancedOptionsSubPage,
+ chrome::kAutofillSubPage,
+ chrome::kBrowserOptionsSubPage,
+ chrome::kClearBrowserDataSubPage,
+ chrome::kContentSettingsSubPage,
+ chrome::kContentSettingsExceptionsSubPage,
+ chrome::kImportDataSubPage,
+ chrome::kInstantConfirmPage,
+ chrome::kLanguageOptionsSubPage,
+ chrome::kPersonalOptionsSubPage,
+ chrome::kPasswordManagerSubPage,
+ chrome::kSearchEnginesSubPage,
+ chrome::kSyncSetupSubPage,
+#if defined(OS_CHROMEOS)
+ chrome::kAboutOptionsSubPage,
+ chrome::kInternetOptionsSubPage,
+ chrome::kSystemOptionsSubPage,
+#endif
+};
+
+} // namespace
const int BuiltinProvider::kRelevance = 575;
@@ -17,8 +43,12 @@ BuiltinProvider::BuiltinProvider(ACProviderListener* listener,
: AutocompleteProvider(listener, profile, "Builtin") {
std::vector<std::string> builtins(ChromePaths());
for (std::vector<std::string>::iterator i(builtins.begin());
- i != builtins.end(); ++i)
- builtins_.push_back(ASCIIToUTF16("about:") + ASCIIToUTF16(*i));
+ i != builtins.end(); ++i)
+ builtins_.push_back(ASCIIToUTF16(*i));
+ string16 settings(ASCIIToUTF16(chrome::kChromeUISettingsHost) +
+ ASCIIToUTF16("/"));
+ for (size_t i = 0; i < arraysize(kChromeSettingsSubPages); i++)
+ builtins_.push_back(settings + ASCIIToUTF16(kChromeSettingsSubPages[i]));
}
BuiltinProvider::~BuiltinProvider() {}
@@ -31,24 +61,65 @@ void BuiltinProvider::Start(const AutocompleteInput& input,
(input.type() == AutocompleteInput::QUERY) ||
(input.matches_requested() == AutocompleteInput::BEST_MATCH))
return;
- for (Builtins::const_iterator i(builtins_.begin());
- (i != builtins_.end()) && (matches_.size() < kMaxMatches); ++i) {
- if (StartsWith(*i, input.text(), false)) {
- AutocompleteMatch match(this, kRelevance, false,
- AutocompleteMatch::NAVSUGGEST);
- match.fill_into_edit = *i;
- match.destination_url = GURL(*i);
- match.contents = match.fill_into_edit;
- match.contents_class.push_back(ACMatchClassification(0,
- ACMatchClassification::MATCH | ACMatchClassification::URL));
- if (match.contents.length() > input.text().length()) {
- match.contents_class.push_back(
- ACMatchClassification(input.text().length(),
- ACMatchClassification::URL));
+
+ static const string16 kAbout = ASCIIToUTF16(chrome::kAboutScheme) +
+ ASCIIToUTF16(chrome::kStandardSchemeSeparator);
+ static const string16 kChrome = ASCIIToUTF16(chrome::kChromeUIScheme) +
+ ASCIIToUTF16(chrome::kStandardSchemeSeparator);
+
+ static const int kUrl = ACMatchClassification::URL;
+ static const int kMatch = kUrl | ACMatchClassification::MATCH;
+
+ string16 text = input.text();
+ bool starting_chrome = StartsWith(kChrome, text, false);
+ if (starting_chrome || StartsWith(kAbout, text, false)) {
+ ACMatchClassifications styles;
+ // Highlight the input portion matching "chrome://"; or if the user has
+ // input "about:" (with optional slashes), highlight the whole "chrome://".
+ static const size_t kAboutSchemeLength = strlen(chrome::kAboutScheme);
+ bool highlight = starting_chrome || text.length() > kAboutSchemeLength;
+ styles.push_back(ACMatchClassification(0, highlight ? kMatch : kUrl));
+ size_t offset = starting_chrome ? text.length() : kChrome.length();
+ if (highlight)
+ styles.push_back(ACMatchClassification(offset, kUrl));
+ // Include some common builtin chrome URLs as the user types the scheme.
+ AddMatch(ASCIIToUTF16(chrome::kChromeUIChromeURLsURL), styles);
+ AddMatch(ASCIIToUTF16(chrome::kChromeUISettingsURL), styles);
+ AddMatch(ASCIIToUTF16(chrome::kChromeUIVersionURL), styles);
+ } else {
+ // Match input about: or chrome: URL input against builtin chrome URLs.
+ GURL url = URLFixerUpper::FixupURL(UTF16ToUTF8(text), std::string());
+ if (url.SchemeIs(chrome::kChromeUIScheme) && url.has_host()) {
+ // Include the path for sub-pages (e.g. "chrome://settings/browser").
+ string16 host_and_path = UTF8ToUTF16(url.host() + url.path());
+ TrimString(host_and_path, ASCIIToUTF16("/").c_str(), &host_and_path);
+ size_t match_length = kChrome.length() + host_and_path.length();
+ for (Builtins::const_iterator i(builtins_.begin());
+ (i != builtins_.end()) && (matches_.size() < kMaxMatches); ++i) {
+ if (StartsWith(*i, host_and_path, false)) {
+ ACMatchClassifications styles;
+ // Highlight the "chrome://" scheme, even for input "about:foo".
+ styles.push_back(ACMatchClassification(0, kMatch));
+ string16 match_string = kChrome + *i;
+ if (match_string.length() > match_length)
+ styles.push_back(ACMatchClassification(match_length, kUrl));
+ AddMatch(match_string, styles);
+ }
}
- matches_.push_back(match);
}
}
+
for (size_t i = 0; i < matches_.size(); ++i)
matches_[i].relevance = kRelevance + matches_.size() - (i + 1);
}
+
+void BuiltinProvider::AddMatch(const string16& match_string,
+ const ACMatchClassifications& styles) {
+ AutocompleteMatch match(this, kRelevance, false,
+ AutocompleteMatch::NAVSUGGEST);
+ match.fill_into_edit = match_string;
+ match.destination_url = GURL(match_string);
+ match.contents = match_string;
+ match.contents_class = styles;
+ matches_.push_back(match);
+}
diff --git a/chrome/browser/autocomplete/builtin_provider.h b/chrome/browser/autocomplete/builtin_provider.h
index 6ed35b3..8e9bde3 100644
--- a/chrome/browser/autocomplete/builtin_provider.h
+++ b/chrome/browser/autocomplete/builtin_provider.h
@@ -3,7 +3,7 @@
// found in the LICENSE file.
//
// This file contains the autocomplete provider for built-in URLs,
-// such as about:settings.
+// such as about:settings and chrome://version.
//
// For more information on the autocomplete system in general, including how
// the autocomplete controller and autocomplete providers work, see
@@ -17,6 +17,7 @@
#include "base/string16.h"
#include "chrome/browser/autocomplete/autocomplete.h"
+#include "chrome/browser/autocomplete/autocomplete_match.h"
class BuiltinProvider : public AutocompleteProvider {
public:
@@ -27,9 +28,12 @@ class BuiltinProvider : public AutocompleteProvider {
virtual void Start(const AutocompleteInput& input, bool minimal_changes);
private:
+ typedef std::vector<string16> Builtins;
+
static const int kRelevance;
- typedef std::vector<string16> Builtins;
+ void AddMatch(const string16& match_string,
+ const ACMatchClassifications& styles);
Builtins builtins_;
diff --git a/chrome/browser/autocomplete/builtin_provider_unittest.cc b/chrome/browser/autocomplete/builtin_provider_unittest.cc
new file mode 100644
index 0000000..442ca51
--- /dev/null
+++ b/chrome/browser/autocomplete/builtin_provider_unittest.cc
@@ -0,0 +1,231 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "base/message_loop.h"
+#include "base/utf_string_conversions.h"
+#include "chrome/browser/autocomplete/autocomplete_match.h"
+#include "chrome/browser/autocomplete/builtin_provider.h"
+#include "chrome/common/url_constants.h"
+#include "chrome/test/testing_browser_process.h"
+#include "chrome/test/testing_browser_process_test.h"
+#include "googleurl/src/gurl.h"
+#include "testing/gtest/include/gtest/gtest.h"
+
+class BuiltinProviderTest : public TestingBrowserProcessTest {
+ protected:
+ template<class ResultType>
+ struct test_data {
+ const string16 input;
+ const size_t num_results;
+ const ResultType output[3];
+ };
+
+ BuiltinProviderTest() : builtin_provider_(NULL) { }
+ virtual ~BuiltinProviderTest() { }
+
+ virtual void SetUp();
+ virtual void TearDown();
+
+ template<class ResultType>
+ void RunTest(test_data<ResultType>* builtin_cases,
+ int num_cases,
+ ResultType AutocompleteMatch::* member);
+
+ protected:
+ scoped_refptr<BuiltinProvider> builtin_provider_;
+};
+
+void BuiltinProviderTest::SetUp() {
+ builtin_provider_ = new BuiltinProvider(NULL, NULL);
+}
+
+void BuiltinProviderTest::TearDown() {
+ builtin_provider_ = NULL;
+}
+
+template<class ResultType>
+void BuiltinProviderTest::RunTest(test_data<ResultType>* builtin_cases,
+ int num_cases,
+ ResultType AutocompleteMatch::* member) {
+ ACMatches matches;
+ for (int i = 0; i < num_cases; ++i) {
+ AutocompleteInput input(builtin_cases[i].input, string16(), true,
+ false, true, AutocompleteInput::ALL_MATCHES);
+ builtin_provider_->Start(input, false);
+ EXPECT_TRUE(builtin_provider_->done());
+ matches = builtin_provider_->matches();
+ EXPECT_EQ(builtin_cases[i].num_results, matches.size()) <<
+ ASCIIToUTF16("Input was: ") << builtin_cases[i].input;
+ if (matches.size() == builtin_cases[i].num_results) {
+ for (size_t j = 0; j < builtin_cases[i].num_results; ++j) {
+ EXPECT_EQ(builtin_cases[i].output[j], matches[j].*member) <<
+ ASCIIToUTF16("Input was: ") << builtin_cases[i].input;
+ }
+ }
+ }
+}
+
+TEST_F(BuiltinProviderTest, TypingScheme) {
+ const string16 kAbout = ASCIIToUTF16(chrome::kAboutScheme);
+ const string16 kChrome = ASCIIToUTF16(chrome::kChromeUIScheme);
+ const string16 kSeparator1 = ASCIIToUTF16(":");
+ const string16 kSeparator2 = ASCIIToUTF16(":/");
+ const string16 kSeparator3 = ASCIIToUTF16(chrome::kStandardSchemeSeparator);
+
+ // These default URLs should correspond with those in BuiltinProvider::Start.
+ const GURL kURL1 = GURL(chrome::kChromeUIChromeURLsURL);
+ const GURL kURL2 = GURL(chrome::kChromeUISettingsURL);
+ const GURL kURL3 = GURL(chrome::kChromeUIVersionURL);
+
+ test_data<GURL> typing_scheme_cases[] = {
+ // Typing an unrelated scheme should give nothing.
+ {ASCIIToUTF16("h"), 0, {}},
+ {ASCIIToUTF16("http"), 0, {}},
+ {ASCIIToUTF16("file"), 0, {}},
+ {ASCIIToUTF16("abouz"), 0, {}},
+ {ASCIIToUTF16("aboutt"), 0, {}},
+ {ASCIIToUTF16("aboutt:"), 0, {}},
+ {ASCIIToUTF16("chroma"), 0, {}},
+ {ASCIIToUTF16("chromee"), 0, {}},
+ {ASCIIToUTF16("chromee:"), 0, {}},
+
+ // Typing a portion of about:// should give the default urls.
+ {kAbout.substr(0, 1), 3, {kURL1, kURL2, kURL3}},
+ {ASCIIToUTF16("A"), 3, {kURL1, kURL2, kURL3}},
+ {kAbout, 3, {kURL1, kURL2, kURL3}},
+ {kAbout + kSeparator1, 3, {kURL1, kURL2, kURL3}},
+ {kAbout + kSeparator2, 3, {kURL1, kURL2, kURL3}},
+ {kAbout + kSeparator3, 3, {kURL1, kURL2, kURL3}},
+ {ASCIIToUTF16("aBoUT://"), 3, {kURL1, kURL2, kURL3}},
+
+ // Typing a portion of chrome:// should give the default urls.
+ {kChrome.substr(0, 1), 3, {kURL1, kURL2, kURL3}},
+ {ASCIIToUTF16("C"), 3, {kURL1, kURL2, kURL3}},
+ {kChrome, 3, {kURL1, kURL2, kURL3}},
+ {kChrome + kSeparator1, 3, {kURL1, kURL2, kURL3}},
+ {kChrome + kSeparator2, 3, {kURL1, kURL2, kURL3}},
+ {kChrome + kSeparator3, 3, {kURL1, kURL2, kURL3}},
+ {ASCIIToUTF16("ChRoMe://"), 3, {kURL1, kURL2, kURL3}},
+ };
+
+ RunTest<GURL>(typing_scheme_cases, arraysize(typing_scheme_cases),
+ &AutocompleteMatch::destination_url);
+}
+
+TEST_F(BuiltinProviderTest, NonChromeURLs) {
+ test_data<GURL> non_chrome_url_cases[] = {
+ // Typing an unrelated scheme should give nothing.
+ {ASCIIToUTF16("g@rb@g3"), 0, {}},
+ {ASCIIToUTF16("www.google.com"), 0, {}},
+ {ASCIIToUTF16("http:www.google.com"), 0, {}},
+ {ASCIIToUTF16("http://www.google.com"), 0, {}},
+ {ASCIIToUTF16("file:filename"), 0, {}},
+ {ASCIIToUTF16("scheme:"), 0, {}},
+ {ASCIIToUTF16("scheme://"), 0, {}},
+ {ASCIIToUTF16("scheme://host"), 0, {}},
+ {ASCIIToUTF16("scheme:host/path?query#ref"), 0, {}},
+ {ASCIIToUTF16("scheme://host/path?query#ref"), 0, {}},
+ };
+
+ RunTest<GURL>(non_chrome_url_cases, arraysize(non_chrome_url_cases),
+ &AutocompleteMatch::destination_url);
+}
+
+TEST_F(BuiltinProviderTest, ChromeURLs) {
+ const string16 kAbout = ASCIIToUTF16(chrome::kAboutScheme);
+ const string16 kChrome = ASCIIToUTF16(chrome::kChromeUIScheme);
+ const string16 kSeparator1 = ASCIIToUTF16(":");
+ const string16 kSeparator2 = ASCIIToUTF16(":/");
+ const string16 kSeparator3 = ASCIIToUTF16(chrome::kStandardSchemeSeparator);
+
+ // This makes assumptions about the chrome URLs listed by the BuiltinProvider.
+ // Currently they are derived from ChromePaths() in browser_about_handler.cc.
+ const string16 kHostA = ASCIIToUTF16(chrome::kChromeUIAppCacheInternalsHost);
+ const GURL kURLA = GURL(kChrome + kSeparator3 + kHostA);
+ // This test assumes these are the first three chrome hosts starting with "c".
+ const string16 kHostC1 = ASCIIToUTF16(chrome::kChromeUIChromeURLsHost);
+ const string16 kHostC2 = ASCIIToUTF16(chrome::kChromeUICrashesHost);
+ const string16 kHostC3 = ASCIIToUTF16(chrome::kChromeUICreditsHost);
+ const GURL kURLC1 = GURL(kChrome + kSeparator3 + kHostC1);
+ const GURL kURLC2 = GURL(kChrome + kSeparator3 + kHostC2);
+ const GURL kURLC3 = GURL(kChrome + kSeparator3 + kHostC3);
+
+ test_data<GURL> chrome_url_cases[] = {
+ // Typing an about URL with an unknown host should give nothing.
+ {kAbout + kSeparator1 + ASCIIToUTF16("host"), 0, {}},
+ {kAbout + kSeparator2 + ASCIIToUTF16("host"), 0, {}},
+ {kAbout + kSeparator3 + ASCIIToUTF16("host"), 0, {}},
+
+ // Typing a chrome URL with an unknown host should give nothing.
+ {kChrome + kSeparator1 + ASCIIToUTF16("host"), 0, {}},
+ {kChrome + kSeparator2 + ASCIIToUTF16("host"), 0, {}},
+ {kChrome + kSeparator3 + ASCIIToUTF16("host"), 0, {}},
+
+ // Typing an about URL for a unique host should provide that full URL.
+ {kAbout + kSeparator1 + kHostA.substr(0, 1), 1, {kURLA}},
+ {kAbout + kSeparator2 + kHostA.substr(0, 2), 1, {kURLA}},
+ {kAbout + kSeparator3 + kHostA.substr(0, kHostA.length() - 1), 1, {kURLA}},
+ {kAbout + kSeparator1 + kHostA, 1, {kURLA}},
+ {kAbout + kSeparator2 + kHostA, 1, {kURLA}},
+ {kAbout + kSeparator3 + kHostA, 1, {kURLA}},
+
+ // Typing a chrome URL for a unique host should provide that full URL.
+ {kChrome + kSeparator1 + kHostA.substr(0, 1), 1, {kURLA}},
+ {kChrome + kSeparator2 + kHostA.substr(0, 2), 1, {kURLA}},
+ {kChrome + kSeparator3 + kHostA.substr(0, kHostA.length() - 1), 1, {kURLA}},
+ {kChrome + kSeparator1 + kHostA, 1, {kURLA}},
+ {kChrome + kSeparator2 + kHostA, 1, {kURLA}},
+ {kChrome + kSeparator3 + kHostA, 1, {kURLA}},
+
+ // Typing an about URL with a non-unique host should provide matching URLs.
+ {kAbout + kSeparator1 + kHostC1.substr(0, 1), 3, {kURLC1, kURLC2, kURLC3}},
+ {kAbout + kSeparator2 + kHostC1.substr(0, 2), 1, {kURLC1}},
+ {kAbout + kSeparator3 + kHostC2.substr(0, 2), 2, {kURLC2, kURLC3}},
+ {kAbout + kSeparator3 + kHostC2.substr(0, 3), 1, {kURLC2}},
+ {kAbout + kSeparator3 + kHostC1, 1, {kURLC1}},
+ {kAbout + kSeparator2 + kHostC2, 1, {kURLC2}},
+ {kAbout + kSeparator1 + kHostC3, 1, {kURLC3}},
+
+ // Typing a chrome URL with a non-unique host should provide matching URLs.
+ {kChrome + kSeparator1 + kHostC1.substr(0, 1), 3, {kURLC1, kURLC2, kURLC3}},
+ {kChrome + kSeparator2 + kHostC1.substr(0, 2), 1, {kURLC1}},
+ {kChrome + kSeparator3 + kHostC2.substr(0, 2), 2, {kURLC2, kURLC3}},
+ {kChrome + kSeparator3 + kHostC2.substr(0, 3), 1, {kURLC2}},
+ {kChrome + kSeparator3 + kHostC1, 1, {kURLC1}},
+ {kChrome + kSeparator2 + kHostC2, 1, {kURLC2}},
+ {kChrome + kSeparator1 + kHostC3, 1, {kURLC3}},
+ };
+
+ RunTest<GURL>(chrome_url_cases, arraysize(chrome_url_cases),
+ &AutocompleteMatch::destination_url);
+}
+
+TEST_F(BuiltinProviderTest, ChromeSettingsSubpages) {
+ // This makes assumptions about the chrome URLs listed by the BuiltinProvider.
+ // Currently they are derived from ChromePaths() in browser_about_handler.cc.
+ const string16 kSettings = ASCIIToUTF16(chrome::kChromeUISettingsURL);
+ const string16 kDefaultPage1 = ASCIIToUTF16(chrome::kAdvancedOptionsSubPage);
+ const string16 kDefaultPage2 = ASCIIToUTF16(chrome::kAutofillSubPage);
+ const GURL kDefaultURL1 = GURL(kSettings + kDefaultPage1);
+ const GURL kDefaultURL2 = GURL(kSettings + kDefaultPage2);
+ const string16 kPage1 = ASCIIToUTF16(chrome::kPersonalOptionsSubPage);
+ const string16 kPage2 = ASCIIToUTF16(chrome::kPasswordManagerSubPage);
+ const GURL kURL1 = GURL(kSettings + kPage1);
+ const GURL kURL2 = GURL(kSettings + kPage2);
+
+ test_data<GURL> settings_subpage_cases[] = {
+ // Typing the settings path should show settings and the first two subpages.
+ {kSettings, 3, {GURL(kSettings), kDefaultURL1, kDefaultURL2}},
+
+ // Typing a subpage path should return the appropriate results.
+ {kSettings + kPage1.substr(0, 1), 2, {kURL1, kURL2}},
+ {kSettings + kPage1.substr(0, 2), 1, {kURL1}},
+ {kSettings + kPage1.substr(0, kPage1.length() - 1), 1, {kURL1}},
+ {kSettings + kPage1, 1, {kURL1}},
+ {kSettings + kPage2, 1, {kURL2}},
+ };
+
+ RunTest<GURL>(settings_subpage_cases, arraysize(settings_subpage_cases),
+ &AutocompleteMatch::destination_url);
+}
diff --git a/chrome/browser/browser_about_handler.cc b/chrome/browser/browser_about_handler.cc
index ceb4ccf..cd86b8b 100644
--- a/chrome/browser/browser_about_handler.cc
+++ b/chrome/browser/browser_about_handler.cc
@@ -106,10 +106,11 @@ namespace {
// Add paths here to be included in chrome://chrome-urls/.
// These paths will also be suggested by BuiltinProvider.
-const char *kChromePaths[] = {
+const char* kChromePaths[] = {
chrome::kChromeUIAppCacheInternalsHost,
chrome::kChromeUIBlobInternalsHost,
chrome::kChromeUIChromeURLsHost,
+ chrome::kChromeUICrashesHost,
chrome::kChromeUICreditsHost,
chrome::kChromeUIDNSHost,
chrome::kChromeUIFlagsHost,
@@ -120,6 +121,7 @@ const char *kChromePaths[] = {
chrome::kChromeUINetInternalsHost,
chrome::kChromeUINetworkViewCacheHost,
chrome::kChromeUIPluginsHost,
+ chrome::kChromeUISettingsHost,
chrome::kChromeUIStatsHost,
chrome::kChromeUISyncInternalsHost,
chrome::kChromeUITCMallocHost,
@@ -143,7 +145,7 @@ const char *kChromePaths[] = {
// Debug paths, presented without links in chrome://about.
// These paths will not be suggested by BuiltinProvider.
-const char *kDebugChromePaths[] = {
+const char* kDebugChromePaths[] = {
chrome::kChromeUICrashHost,
chrome::kChromeUIKillHost,
chrome::kChromeUIHangHost,
diff --git a/chrome/chrome_tests.gypi b/chrome/chrome_tests.gypi
index 2f9ef00..cfe40ee2 100644
--- a/chrome/chrome_tests.gypi
+++ b/chrome/chrome_tests.gypi
@@ -1251,6 +1251,7 @@
'browser/autocomplete/autocomplete_popup_view_mac_unittest.mm',
'browser/autocomplete/autocomplete_result_unittest.cc',
'browser/autocomplete/autocomplete_unittest.cc',
+ 'browser/autocomplete/builtin_provider_unittest.cc',
'browser/autocomplete/extension_app_provider_unittest.cc',
'browser/autocomplete/history_contents_provider_unittest.cc',
'browser/autocomplete/history_quick_provider_unittest.cc',
diff --git a/chrome/common/url_constants.cc b/chrome/common/url_constants.cc
index 0438ac6..11ae7ed 100644
--- a/chrome/common/url_constants.cc
+++ b/chrome/common/url_constants.cc
@@ -55,6 +55,7 @@ const char kAboutBrowserCrash[] = "about:inducebrowsercrashforrealz";
const char kChromeUIAboutURL[] = "chrome://about/";
const char kChromeUIBookmarksURL[] = "chrome://bookmarks/";
const char kChromeUIBugReportURL[] = "chrome://bugreport/";
+const char kChromeUIChromeURLsURL[] = "chrome://chrome-urls/";
const char kChromeUICloudPrintResourcesURL[] = "chrome://cloudprintresources/";
const char kChromeUIConflictsURL[] = "chrome://conflicts/";
const char kChromeUIConstrainedHTMLTestURL[] = "chrome://constrained-test/";
diff --git a/chrome/common/url_constants.h b/chrome/common/url_constants.h
index d9544a5..eabf80b 100644
--- a/chrome/common/url_constants.h
+++ b/chrome/common/url_constants.h
@@ -48,6 +48,7 @@ extern const char kAboutVersionURL[];
extern const char kChromeUIAboutURL[];
extern const char kChromeUIBookmarksURL[];
extern const char kChromeUIBugReportURL[];
+extern const char kChromeUIChromeURLsURL[];
extern const char kChromeUICloudPrintResourcesURL[];
extern const char kChromeUIConflictsURL[];
extern const char kChromeUIConstrainedHTMLTestURL[];
diff --git a/ui/gfx/canvas.h b/ui/gfx/canvas.h
index e4ce7ad..c83b797 100644
--- a/ui/gfx/canvas.h
+++ b/ui/gfx/canvas.h
@@ -178,8 +178,8 @@ class Canvas {
// Draws text with the specified color, font and location. The text is
// aligned to the left, vertically centered, clipped to the region. If the
// text is too big, it is truncated and '...' is added to the end.
- virtual void DrawStringInt(const string16& text, const
- gfx::Font& font,
+ virtual void DrawStringInt(const string16& text,
+ const gfx::Font& font,
const SkColor& color,
int x, int y, int w, int h) = 0;
virtual void DrawStringInt(const string16& text,