diff options
Diffstat (limited to 'chrome/browser')
-rw-r--r-- | chrome/browser/autocomplete/autocomplete.cc | 12 | ||||
-rw-r--r-- | chrome/browser/autocomplete/autocomplete_unittest.cc | 6 | ||||
-rw-r--r-- | chrome/browser/browsing_data_database_helper.cc | 8 | ||||
-rw-r--r-- | chrome/browser/browsing_data_database_helper.h | 4 | ||||
-rw-r--r-- | chrome/browser/browsing_data_indexed_db_helper.h | 6 | ||||
-rw-r--r-- | chrome/browser/browsing_data_local_storage_helper.h | 6 | ||||
-rw-r--r-- | chrome/browser/extensions/api/web_request/web_request_api.cc | 1 | ||||
-rw-r--r-- | chrome/browser/extensions/extension_webnavigation_api.cc | 1 | ||||
-rw-r--r-- | chrome/browser/history/url_index_private_data.cc | 1 | ||||
-rw-r--r-- | chrome/browser/net/url_fixer_upper.cc | 16 | ||||
-rw-r--r-- | chrome/browser/web_applications/web_app.cc | 1 |
11 files changed, 21 insertions, 41 deletions
diff --git a/chrome/browser/autocomplete/autocomplete.cc b/chrome/browser/autocomplete/autocomplete.cc index 0efd16d..010617a 100644 --- a/chrome/browser/autocomplete/autocomplete.cc +++ b/chrome/browser/autocomplete/autocomplete.cc @@ -95,7 +95,6 @@ AutocompleteInput::AutocompleteInput(const string16& text, if (((type_ == UNKNOWN) || (type_ == REQUESTED_URL) || (type_ == URL)) && canonicalized_url.is_valid() && (!canonicalized_url.IsStandard() || canonicalized_url.SchemeIsFile() || - canonicalized_url.SchemeIsFileSystem() || !canonicalized_url.host().empty())) canonicalized_url_ = canonicalized_url; @@ -167,14 +166,6 @@ AutocompleteInput::Type AutocompleteInput::Parse( return URL; } - if (LowerCaseEqualsASCII(parsed_scheme, chrome::kFileSystemScheme)) { - // This could theoretically be a strange search, but let's check. - // If it's got an inner_url with a scheme, it's a URL, whether it's valid or - // not. - if (parts->inner_parsed() && parts->inner_parsed()->scheme.is_valid()) - return URL; - } - // If the user typed a scheme, and it's HTTP or HTTPS, we know how to parse it // well enough that we can fall through to the heuristics below. If it's // something else, we can just determine our action based on what we do with @@ -464,9 +455,6 @@ void AutocompleteInput::ParseForEmphasizeComponents( host->reset(); } } - } else if (LowerCaseEqualsASCII(scheme_str, chrome::kFileSystemScheme) && - parts.inner_parsed() && parts.inner_parsed()->scheme.is_valid()) { - *host = parts.inner_parsed()->host; } } diff --git a/chrome/browser/autocomplete/autocomplete_unittest.cc b/chrome/browser/autocomplete/autocomplete_unittest.cc index fbf4ad51..ed35f16 100644 --- a/chrome/browser/autocomplete/autocomplete_unittest.cc +++ b/chrome/browser/autocomplete/autocomplete_unittest.cc @@ -495,12 +495,6 @@ TEST_F(AutocompleteTest, InputType) { { ASCIIToUTF16("[2001:dB8::1]"), AutocompleteInput::URL }, { ASCIIToUTF16("192.168.0.256"), AutocompleteInput::QUERY }, { ASCIIToUTF16("[foo.com]"), AutocompleteInput::QUERY }, - { ASCIIToUTF16("filesystem:http://a.com/t/bar"), AutocompleteInput::URL }, - { ASCIIToUTF16("filesystem:http:foo"), AutocompleteInput::URL }, - { ASCIIToUTF16("filesystem:file://"), AutocompleteInput::URL }, - { ASCIIToUTF16("filesystem:http"), AutocompleteInput::URL }, - { ASCIIToUTF16("filesystem:"), AutocompleteInput::URL }, - { ASCIIToUTF16("ftp:"), AutocompleteInput::URL }, }; for (size_t i = 0; i < ARRAYSIZE_UNSAFE(input_cases); ++i) { diff --git a/chrome/browser/browsing_data_database_helper.cc b/chrome/browser/browsing_data_database_helper.cc index 0bc331f..ccb5615 100644 --- a/chrome/browser/browsing_data_database_helper.cc +++ b/chrome/browser/browsing_data_database_helper.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// 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. @@ -44,6 +44,12 @@ BrowsingDataDatabaseHelper::DatabaseInfo::DatabaseInfo( BrowsingDataDatabaseHelper::DatabaseInfo::~DatabaseInfo() {} +bool BrowsingDataDatabaseHelper::DatabaseInfo::IsFileSchemeData() { + return StartsWithASCII(origin_identifier, + std::string(chrome::kFileScheme), + true); +} + BrowsingDataDatabaseHelper::BrowsingDataDatabaseHelper(Profile* profile) : is_fetching_(false), tracker_(BrowserContext::GetDatabaseTracker(profile)) { diff --git a/chrome/browser/browsing_data_database_helper.h b/chrome/browser/browsing_data_database_helper.h index 3d974ee..2d3a853 100644 --- a/chrome/browser/browsing_data_database_helper.h +++ b/chrome/browser/browsing_data_database_helper.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// 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. @@ -41,6 +41,8 @@ class BrowsingDataDatabaseHelper base::Time last_modified); ~DatabaseInfo(); + bool IsFileSchemeData(); + std::string host; std::string database_name; std::string origin_identifier; diff --git a/chrome/browser/browsing_data_indexed_db_helper.h b/chrome/browser/browsing_data_indexed_db_helper.h index 5916b40..5d7177e50 100644 --- a/chrome/browser/browsing_data_indexed_db_helper.h +++ b/chrome/browser/browsing_data_indexed_db_helper.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// 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. @@ -38,6 +38,10 @@ class BrowsingDataIndexedDBHelper base::Time last_modified); ~IndexedDBInfo(); + bool IsFileSchemeData() { + return origin.SchemeIsFile(); + } + GURL origin; int64 size; base::Time last_modified; diff --git a/chrome/browser/browsing_data_local_storage_helper.h b/chrome/browser/browsing_data_local_storage_helper.h index 359f14c..7f88985 100644 --- a/chrome/browser/browsing_data_local_storage_helper.h +++ b/chrome/browser/browsing_data_local_storage_helper.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// 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. @@ -49,6 +49,10 @@ class BrowsingDataLocalStorageHelper base::Time last_modified); ~LocalStorageInfo(); + bool IsFileSchemeData() { + return protocol == chrome::kFileScheme; + } + std::string protocol; std::string host; unsigned short port; diff --git a/chrome/browser/extensions/api/web_request/web_request_api.cc b/chrome/browser/extensions/api/web_request/web_request_api.cc index 95d3723..c4853a9 100644 --- a/chrome/browser/extensions/api/web_request/web_request_api.cc +++ b/chrome/browser/extensions/api/web_request/web_request_api.cc @@ -160,7 +160,6 @@ bool IsSensitiveURL(const GURL& url) { bool HasWebRequestScheme(const GURL& url) { return (url.SchemeIs(chrome::kAboutScheme) || url.SchemeIs(chrome::kFileScheme) || - url.SchemeIs(chrome::kFileSystemScheme) || url.SchemeIs(chrome::kFtpScheme) || url.SchemeIs(chrome::kHttpScheme) || url.SchemeIs(chrome::kHttpsScheme) || diff --git a/chrome/browser/extensions/extension_webnavigation_api.cc b/chrome/browser/extensions/extension_webnavigation_api.cc index b092a7c..485435d 100644 --- a/chrome/browser/extensions/extension_webnavigation_api.cc +++ b/chrome/browser/extensions/extension_webnavigation_api.cc @@ -49,7 +49,6 @@ const char* kValidSchemes[] = { chrome::kFtpScheme, chrome::kJavaScriptScheme, chrome::kDataScheme, - chrome::kFileSystemScheme, }; // Returns the frame ID as it will be passed to the extension: diff --git a/chrome/browser/history/url_index_private_data.cc b/chrome/browser/history/url_index_private_data.cc index b35acf0f..de779f4 100644 --- a/chrome/browser/history/url_index_private_data.cc +++ b/chrome/browser/history/url_index_private_data.cc @@ -912,7 +912,6 @@ void URLIndexPrivateData::InitializeSchemeWhitelist( whitelist->insert(std::string(chrome::kAboutScheme)); whitelist->insert(std::string(chrome::kChromeUIScheme)); whitelist->insert(std::string(chrome::kFileScheme)); - whitelist->insert(std::string(chrome::kFileSystemScheme)); whitelist->insert(std::string(chrome::kFtpScheme)); whitelist->insert(std::string(chrome::kHttpScheme)); whitelist->insert(std::string(chrome::kHttpsScheme)); diff --git a/chrome/browser/net/url_fixer_upper.cc b/chrome/browser/net/url_fixer_upper.cc index 4a4a883..2e025fc 100644 --- a/chrome/browser/net/url_fixer_upper.cc +++ b/chrome/browser/net/url_fixer_upper.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// 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. @@ -412,13 +412,6 @@ std::string URLFixerUpper::SegmentURL(const std::string& text, url_parse::Component(0, static_cast<int>(scheme.length()))))) return scheme; - if (scheme == chrome::kFileSystemScheme) { - // Have the GURL parser do the heavy lifting for us. - url_parse::ParseFileSystemURL(text.data(), - static_cast<int>(text.length()), parts); - return scheme; - } - if (parts->scheme.is_valid()) { // Have the GURL parser do the heavy lifting for us. url_parse::ParseStandardURL(text.data(), static_cast<int>(text.length()), @@ -485,13 +478,6 @@ GURL URLFixerUpper::FixupURL(const std::string& text, if (scheme == chrome::kFileScheme) return GURL(parts.scheme.is_valid() ? text : FixupPath(text)); - // We handle the filesystem scheme separately. - if (scheme == chrome::kFileSystemScheme) { - if (parts.inner_parsed() && parts.inner_parsed()->scheme.is_valid()) - return GURL(text); - return GURL(); - } - // Parse and rebuild about: and chrome: URLs, except about:blank. bool chrome_url = !LowerCaseEqualsASCII(trimmed, chrome::kAboutBlankURL) && ((scheme == chrome::kAboutScheme) || (scheme == chrome::kChromeUIScheme)); diff --git a/chrome/browser/web_applications/web_app.cc b/chrome/browser/web_applications/web_app.cc index 575e72a..4ff951f 100644 --- a/chrome/browser/web_applications/web_app.cc +++ b/chrome/browser/web_applications/web_app.cc @@ -135,7 +135,6 @@ void CreateShortcut( bool IsValidUrl(const GURL& url) { static const char* const kValidUrlSchemes[] = { chrome::kFileScheme, - chrome::kFileSystemScheme, chrome::kFtpScheme, chrome::kHttpScheme, chrome::kHttpsScheme, |