summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorblundell <blundell@chromium.org>2015-07-08 03:07:45 -0700
committerCommit bot <commit-bot@chromium.org>2015-07-08 10:08:22 +0000
commitee0ade20e42f6ff67ec7402c80610e3d0b7f960a (patch)
tree60056d8d047c4bf82f6bf31ce0ec8ca286ef268c
parent0c714f7ca6d4f027501aa8ef8ae91ebc99788b62 (diff)
downloadchromium_src-ee0ade20e42f6ff67ec7402c80610e3d0b7f960a.zip
chromium_src-ee0ade20e42f6ff67ec7402c80610e3d0b7f960a.tar.gz
chromium_src-ee0ade20e42f6ff67ec7402c80610e3d0b7f960a.tar.bz2
Componentize //chrome/common/favicon
This code is used by iOS; move it into //components/favicon_base. TBR=sky, rdsmith Review URL: https://codereview.chromium.org/1223603002 Cr-Commit-Position: refs/heads/master@{#337794}
-rw-r--r--chrome/browser/ui/webui/fallback_icon_source.cc2
-rw-r--r--chrome/browser/ui/webui/favicon_source.cc2
-rw-r--r--chrome/browser/ui/webui/large_icon_source.cc2
-rw-r--r--chrome/chrome_common.gypi6
-rw-r--r--chrome/chrome_tests_unit.gypi3
-rw-r--r--chrome/common/favicon/DEPS3
-rw-r--r--chrome/renderer/searchbox/searchbox.cc6
-rw-r--r--components/components_tests.gyp9
-rw-r--r--components/favicon_base.gypi7
-rw-r--r--components/favicon_base/BUILD.gn10
-rw-r--r--components/favicon_base/DEPS1
-rw-r--r--components/favicon_base/fallback_icon_url_parser.cc (renamed from chrome/common/favicon/fallback_icon_url_parser.cc)2
-rw-r--r--components/favicon_base/fallback_icon_url_parser.h (renamed from chrome/common/favicon/fallback_icon_url_parser.h)6
-rw-r--r--components/favicon_base/fallback_icon_url_parser_unittest.cc (renamed from chrome/common/favicon/fallback_icon_url_parser_unittest.cc)2
-rw-r--r--components/favicon_base/favicon_url_parser.cc (renamed from chrome/common/favicon/favicon_url_parser.cc)2
-rw-r--r--components/favicon_base/favicon_url_parser.h (renamed from chrome/common/favicon/favicon_url_parser.h)6
-rw-r--r--components/favicon_base/favicon_url_parser_unittest.cc (renamed from chrome/common/favicon/favicon_url_parser_unittest.cc)2
-rw-r--r--components/favicon_base/large_icon_url_parser.cc (renamed from chrome/common/favicon/large_icon_url_parser.cc)2
-rw-r--r--components/favicon_base/large_icon_url_parser.h (renamed from chrome/common/favicon/large_icon_url_parser.h)6
-rw-r--r--components/favicon_base/large_icon_url_parser_unittest.cc (renamed from chrome/common/favicon/large_icon_url_parser_unittest.cc)2
20 files changed, 45 insertions, 36 deletions
diff --git a/chrome/browser/ui/webui/fallback_icon_source.cc b/chrome/browser/ui/webui/fallback_icon_source.cc
index 788c284..6f391bf 100644
--- a/chrome/browser/ui/webui/fallback_icon_source.cc
+++ b/chrome/browser/ui/webui/fallback_icon_source.cc
@@ -8,9 +8,9 @@
#include "base/memory/ref_counted_memory.h"
#include "chrome/browser/search/instant_io_context.h"
-#include "chrome/common/favicon/fallback_icon_url_parser.h"
#include "chrome/common/url_constants.h"
#include "components/favicon/core/fallback_icon_service.h"
+#include "components/favicon_base/fallback_icon_url_parser.h"
#include "components/keyed_service/core/service_access_type.h"
#include "net/url_request/url_request.h"
#include "ui/gfx/favicon_size.h"
diff --git a/chrome/browser/ui/webui/favicon_source.cc b/chrome/browser/ui/webui/favicon_source.cc
index 16dfc3e..6b64f09 100644
--- a/chrome/browser/ui/webui/favicon_source.cc
+++ b/chrome/browser/ui/webui/favicon_source.cc
@@ -15,9 +15,9 @@
#include "chrome/browser/search/instant_io_context.h"
#include "chrome/browser/sync/profile_sync_service.h"
#include "chrome/browser/sync/profile_sync_service_factory.h"
-#include "chrome/common/favicon/favicon_url_parser.h"
#include "chrome/common/url_constants.h"
#include "chrome/grit/locale_settings.h"
+#include "components/favicon_base/favicon_url_parser.h"
#include "components/history/core/browser/top_sites.h"
#include "components/sync_driver/open_tabs_ui_delegate.h"
#include "net/url_request/url_request.h"
diff --git a/chrome/browser/ui/webui/large_icon_source.cc b/chrome/browser/ui/webui/large_icon_source.cc
index dfbcc16..82ad0c4 100644
--- a/chrome/browser/ui/webui/large_icon_source.cc
+++ b/chrome/browser/ui/webui/large_icon_source.cc
@@ -8,12 +8,12 @@
#include "base/memory/ref_counted_memory.h"
#include "chrome/browser/search/instant_io_context.h"
-#include "chrome/common/favicon/large_icon_url_parser.h"
#include "chrome/common/url_constants.h"
#include "components/favicon/core/fallback_icon_service.h"
#include "components/favicon/core/large_icon_service.h"
#include "components/favicon_base/fallback_icon_style.h"
#include "components/favicon_base/favicon_types.h"
+#include "components/favicon_base/large_icon_url_parser.h"
#include "net/url_request/url_request.h"
namespace {
diff --git a/chrome/chrome_common.gypi b/chrome/chrome_common.gypi
index 76a3f8a..3b32290 100644
--- a/chrome/chrome_common.gypi
+++ b/chrome/chrome_common.gypi
@@ -51,12 +51,6 @@
'common/custom_handlers/protocol_handler.cc',
'common/custom_handlers/protocol_handler.h',
'common/descriptors_android.h',
- 'common/favicon/fallback_icon_url_parser.cc',
- 'common/favicon/fallback_icon_url_parser.h',
- 'common/favicon/favicon_url_parser.cc',
- 'common/favicon/favicon_url_parser.h',
- 'common/favicon/large_icon_url_parser.cc',
- 'common/favicon/large_icon_url_parser.h',
'common/icon_with_badge_image_source.cc',
'common/icon_with_badge_image_source.h',
'common/ini_parser.cc',
diff --git a/chrome/chrome_tests_unit.gypi b/chrome/chrome_tests_unit.gypi
index 55ee458..f97755a 100644
--- a/chrome/chrome_tests_unit.gypi
+++ b/chrome/chrome_tests_unit.gypi
@@ -533,9 +533,6 @@
'common/chrome_paths_unittest.cc',
'common/cloud_print/cloud_print_helpers_unittest.cc',
'common/crash_keys_unittest.cc',
- 'common/favicon/fallback_icon_url_parser_unittest.cc',
- 'common/favicon/favicon_url_parser_unittest.cc',
- 'common/favicon/large_icon_url_parser_unittest.cc',
'common/ini_parser_unittest.cc',
'common/instant_types_unittest.cc',
'common/mac/cfbundle_blocker_unittest.mm',
diff --git a/chrome/common/favicon/DEPS b/chrome/common/favicon/DEPS
deleted file mode 100644
index 3daf8ae..0000000
--- a/chrome/common/favicon/DEPS
+++ /dev/null
@@ -1,3 +0,0 @@
-include_rules = [
- "+components/favicon_base",
-]
diff --git a/chrome/renderer/searchbox/searchbox.cc b/chrome/renderer/searchbox/searchbox.cc
index c7cb887..92080bf 100644
--- a/chrome/renderer/searchbox/searchbox.cc
+++ b/chrome/renderer/searchbox/searchbox.cc
@@ -13,14 +13,14 @@
#include "base/strings/utf_string_conversions.h"
#include "base/time/time.h"
#include "chrome/common/chrome_switches.h"
-#include "chrome/common/favicon/fallback_icon_url_parser.h"
-#include "chrome/common/favicon/favicon_url_parser.h"
-#include "chrome/common/favicon/large_icon_url_parser.h"
#include "chrome/common/omnibox_focus_state.h"
#include "chrome/common/render_messages.h"
#include "chrome/common/url_constants.h"
#include "chrome/renderer/searchbox/searchbox_extension.h"
+#include "components/favicon_base/fallback_icon_url_parser.h"
#include "components/favicon_base/favicon_types.h"
+#include "components/favicon_base/favicon_url_parser.h"
+#include "components/favicon_base/large_icon_url_parser.h"
#include "content/public/renderer/render_frame.h"
#include "content/public/renderer/render_view.h"
#include "net/base/escape.h"
diff --git a/components/components_tests.gyp b/components/components_tests.gyp
index 72418b3..41a1a8c 100644
--- a/components/components_tests.gyp
+++ b/components/components_tests.gyp
@@ -58,8 +58,8 @@
'autofill/core/browser/ui/card_unmask_prompt_controller_impl_unittest.cc',
'autofill/core/browser/validation_unittest.cc',
'autofill/core/browser/webdata/autofill_profile_syncable_service_unittest.cc',
- 'autofill/core/browser/webdata/autofill_wallet_metadata_syncable_service_unittest.cc',
'autofill/core/browser/webdata/autofill_table_unittest.cc',
+ 'autofill/core/browser/webdata/autofill_wallet_metadata_syncable_service_unittest.cc',
'autofill/core/browser/webdata/web_data_service_unittest.cc',
'autofill/core/common/autofill_regexes_unittest.cc',
'autofill/core/common/form_data_unittest.cc',
@@ -151,8 +151,8 @@
'dom_distiller/core/distiller_unittest.cc',
'dom_distiller/core/distiller_url_fetcher_unittest.cc',
'dom_distiller/core/dom_distiller_model_unittest.cc',
- 'dom_distiller/core/dom_distiller_service_unittest.cc',
'dom_distiller/core/dom_distiller_request_view_base_unittest.cc',
+ 'dom_distiller/core/dom_distiller_service_unittest.cc',
'dom_distiller/core/dom_distiller_store_unittest.cc',
'dom_distiller/core/page_features_unittest.cc',
'dom_distiller/core/task_tracker_unittest.cc',
@@ -171,6 +171,9 @@
'domain_reliability/util_unittest.cc',
],
'favicon_base_unittest_sources': [
+ 'favicon_base/fallback_icon_url_parser_unittest.cc',
+ 'favicon_base/favicon_url_parser_unittest.cc',
+ 'favicon_base/large_icon_url_parser_unittest.cc',
'favicon_base/select_favicon_frames_unittest.cc',
],
'favicon_unittest_sources': [
@@ -459,8 +462,8 @@
'proximity_auth/cryptauth/fake_secure_message_delegate_unittest.cc',
'proximity_auth/cryptauth/sync_scheduler_impl_unittest.cc',
'proximity_auth/logging/logging_unittest.cc',
- 'proximity_auth/proximity_monitor_impl_unittest.cc',
'proximity_auth/proximity_auth_system_unittest.cc',
+ 'proximity_auth/proximity_monitor_impl_unittest.cc',
'proximity_auth/remote_status_update_unittest.cc',
'proximity_auth/throttled_bluetooth_connection_finder_unittest.cc',
'proximity_auth/wire_message_unittest.cc',
diff --git a/components/favicon_base.gypi b/components/favicon_base.gypi
index 852b9be..b1d4669 100644
--- a/components/favicon_base.gypi
+++ b/components/favicon_base.gypi
@@ -13,6 +13,7 @@
],
'dependencies': [
'../base/base.gyp:base',
+ '../net/net.gyp:net',
'../skia/skia.gyp:skia',
'../ui/base/ui_base.gyp:ui_base',
'../ui/gfx/gfx.gyp:gfx',
@@ -22,13 +23,19 @@
'sources': [
'favicon_base/fallback_icon_style.cc',
'favicon_base/fallback_icon_style.h',
+ 'favicon_base/fallback_icon_url_parser.cc',
+ 'favicon_base/fallback_icon_url_parser.h',
'favicon_base/favicon_callback.h',
'favicon_base/favicon_types.cc',
'favicon_base/favicon_types.h',
+ 'favicon_base/favicon_url_parser.cc',
+ 'favicon_base/favicon_url_parser.h',
'favicon_base/favicon_usage_data.cc',
'favicon_base/favicon_usage_data.h',
'favicon_base/favicon_util.cc',
'favicon_base/favicon_util.h',
+ 'favicon_base/large_icon_url_parser.cc',
+ 'favicon_base/large_icon_url_parser.h',
'favicon_base/select_favicon_frames.cc',
'favicon_base/select_favicon_frames.h',
],
diff --git a/components/favicon_base/BUILD.gn b/components/favicon_base/BUILD.gn
index 2fcfb9c..8f92d7a 100644
--- a/components/favicon_base/BUILD.gn
+++ b/components/favicon_base/BUILD.gn
@@ -6,19 +6,26 @@ source_set("favicon_base") {
sources = [
"fallback_icon_style.cc",
"fallback_icon_style.h",
+ "fallback_icon_url_parser.cc",
+ "fallback_icon_url_parser.h",
"favicon_callback.h",
"favicon_types.cc",
"favicon_types.h",
+ "favicon_url_parser.cc",
+ "favicon_url_parser.h",
"favicon_usage_data.cc",
"favicon_usage_data.h",
"favicon_util.cc",
"favicon_util.h",
+ "large_icon_url_parser.cc",
+ "large_icon_url_parser.h",
"select_favicon_frames.cc",
"select_favicon_frames.h",
]
deps = [
"//base",
+ "//net",
"//skia",
"//ui/base",
"//ui/gfx",
@@ -30,6 +37,9 @@ source_set("favicon_base") {
source_set("unit_tests") {
testonly = true
sources = [
+ "fallback_icon_url_parser_unittest.cc",
+ "favicon_url_parser_unittest.cc",
+ "large_icon_url_parser_unittest.cc",
"select_favicon_frames_unittest.cc",
]
diff --git a/components/favicon_base/DEPS b/components/favicon_base/DEPS
index 0265afa..f5a0bac 100644
--- a/components/favicon_base/DEPS
+++ b/components/favicon_base/DEPS
@@ -1,4 +1,5 @@
include_rules = [
+ "+net",
"+skia/ext",
"+third_party/skia/include",
"+ui/base",
diff --git a/chrome/common/favicon/fallback_icon_url_parser.cc b/components/favicon_base/fallback_icon_url_parser.cc
index 2f9467b..ba9f2321 100644
--- a/chrome/common/favicon/fallback_icon_url_parser.cc
+++ b/components/favicon_base/fallback_icon_url_parser.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/common/favicon/fallback_icon_url_parser.h"
+#include "components/favicon_base/fallback_icon_url_parser.h"
#include <algorithm>
diff --git a/chrome/common/favicon/fallback_icon_url_parser.h b/components/favicon_base/fallback_icon_url_parser.h
index 0e6afa9..5d5971e8 100644
--- a/chrome/common/favicon/fallback_icon_url_parser.h
+++ b/components/favicon_base/fallback_icon_url_parser.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_COMMON_FAVICON_FALLBACK_ICON_URL_PARSER_H_
-#define CHROME_COMMON_FAVICON_FALLBACK_ICON_URL_PARSER_H_
+#ifndef COMPONENTS_FAVICON_BASE_FALLBACK_ICON_URL_PARSER_H_
+#define COMPONENTS_FAVICON_BASE_FALLBACK_ICON_URL_PARSER_H_
#include <string>
@@ -69,4 +69,4 @@ class ParsedFallbackIconPath {
} // namespace chrome
-#endif // CHROME_COMMON_FAVICON_FALLBACK_ICON_URL_PARSER_H_
+#endif // COMPONENTS_FAVICON_BASE_FALLBACK_ICON_URL_PARSER_H_
diff --git a/chrome/common/favicon/fallback_icon_url_parser_unittest.cc b/components/favicon_base/fallback_icon_url_parser_unittest.cc
index 2d88f3e..af36304 100644
--- a/chrome/common/favicon/fallback_icon_url_parser_unittest.cc
+++ b/components/favicon_base/fallback_icon_url_parser_unittest.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/common/favicon/fallback_icon_url_parser.h"
+#include "components/favicon_base/fallback_icon_url_parser.h"
#include "base/memory/scoped_ptr.h"
#include "components/favicon_base/fallback_icon_style.h"
diff --git a/chrome/common/favicon/favicon_url_parser.cc b/components/favicon_base/favicon_url_parser.cc
index 5f0bdf7..27ee8e1 100644
--- a/chrome/common/favicon/favicon_url_parser.cc
+++ b/components/favicon_base/favicon_url_parser.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/common/favicon/favicon_url_parser.h"
+#include "components/favicon_base/favicon_url_parser.h"
#include "base/strings/string_number_conversions.h"
#include "components/favicon_base/favicon_types.h"
diff --git a/chrome/common/favicon/favicon_url_parser.h b/components/favicon_base/favicon_url_parser.h
index d7de770..c1d3f022 100644
--- a/chrome/common/favicon/favicon_url_parser.h
+++ b/components/favicon_base/favicon_url_parser.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_COMMON_FAVICON_FAVICON_URL_PARSER_H_
-#define CHROME_COMMON_FAVICON_FAVICON_URL_PARSER_H_
+#ifndef COMPONENTS_FAVICON_BASE_FAVICON_URL_PARSER_H_
+#define COMPONENTS_FAVICON_BASE_FAVICON_URL_PARSER_H_
#include <string>
@@ -37,4 +37,4 @@ bool ParseFaviconPath(const std::string& path,
} // namespace chrome
-#endif // CHROME_COMMON_FAVICON_FAVICON_URL_PARSER_H_
+#endif // COMPONENTS_FAVICON_BASE_FAVICON_URL_PARSER_H_
diff --git a/chrome/common/favicon/favicon_url_parser_unittest.cc b/components/favicon_base/favicon_url_parser_unittest.cc
index 6077b7e..f460068 100644
--- a/chrome/common/favicon/favicon_url_parser_unittest.cc
+++ b/components/favicon_base/favicon_url_parser_unittest.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/common/favicon/favicon_url_parser.h"
+#include "components/favicon_base/favicon_url_parser.h"
#include "base/memory/scoped_ptr.h"
#include "components/favicon_base/favicon_types.h"
diff --git a/chrome/common/favicon/large_icon_url_parser.cc b/components/favicon_base/large_icon_url_parser.cc
index 67bae01..9f1a9ac 100644
--- a/chrome/common/favicon/large_icon_url_parser.cc
+++ b/components/favicon_base/large_icon_url_parser.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/common/favicon/large_icon_url_parser.h"
+#include "components/favicon_base/large_icon_url_parser.h"
#include "base/logging.h"
#include "base/strings/string_number_conversions.h"
diff --git a/chrome/common/favicon/large_icon_url_parser.h b/components/favicon_base/large_icon_url_parser.h
index dd58b83..3d60b76 100644
--- a/chrome/common/favicon/large_icon_url_parser.h
+++ b/components/favicon_base/large_icon_url_parser.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_COMMON_FAVICON_LARGE_ICON_URL_PARSER_H_
-#define CHROME_COMMON_FAVICON_LARGE_ICON_URL_PARSER_H_
+#ifndef COMPONENTS_FAVICON_BASE_LARGE_ICON_URL_PARSER_H_
+#define COMPONENTS_FAVICON_BASE_LARGE_ICON_URL_PARSER_H_
#include <string>
@@ -43,4 +43,4 @@ class LargeIconUrlParser {
DISALLOW_COPY_AND_ASSIGN(LargeIconUrlParser);
};
-#endif // CHROME_COMMON_FAVICON_LARGE_ICON_URL_PARSER_H_
+#endif // COMPONENTS_FAVICON_BASE_LARGE_ICON_URL_PARSER_H_
diff --git a/chrome/common/favicon/large_icon_url_parser_unittest.cc b/components/favicon_base/large_icon_url_parser_unittest.cc
index 4899edb..e6f52ec 100644
--- a/chrome/common/favicon/large_icon_url_parser_unittest.cc
+++ b/components/favicon_base/large_icon_url_parser_unittest.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/common/favicon/large_icon_url_parser.h"
+#include "components/favicon_base/large_icon_url_parser.h"
#include "base/memory/scoped_ptr.h"
#include "testing/gtest/include/gtest/gtest.h"