| Index: components/ntp_snippets/category_factory.cc
|
| diff --git a/components/ntp_snippets/category_factory.cc b/components/ntp_snippets/category_factory.cc
|
| index 9962f0771eb05fda3eb43074cfb66ccbf5b85e2e..4da984e016232a02443f6d041209e40c429b63c2 100644
|
| --- a/components/ntp_snippets/category_factory.cc
|
| +++ b/components/ntp_snippets/category_factory.cc
|
| @@ -12,13 +12,6 @@
|
|
|
| namespace ntp_snippets {
|
|
|
| -namespace {
|
| -
|
| -const char kCombinedIDFormat[] = "%d|%s";
|
| -const char kSeparator = '|';
|
| -
|
| -} // namespace
|
| -
|
| CategoryFactory::CategoryFactory() {
|
| // Add all local categories in a fixed order.
|
| AddKnownCategory(KnownCategories::DOWNLOADS);
|
| @@ -66,32 +59,6 @@ bool CategoryFactory::CompareCategories(const Category& left,
|
| ordered_categories_.end(), right);
|
| }
|
|
|
| -std::string CategoryFactory::MakeUniqueID(
|
| - Category category,
|
| - const std::string& within_category_id) const {
|
| - return base::StringPrintf(kCombinedIDFormat, category.id(),
|
| - within_category_id.c_str());
|
| -}
|
| -
|
| -Category CategoryFactory::GetCategoryFromUniqueID(
|
| - const std::string& unique_id) {
|
| - size_t colon_index = unique_id.find(kSeparator);
|
| - DCHECK_NE(std::string::npos, colon_index) << "Not a valid unique_id: "
|
| - << unique_id;
|
| - int category = -1;
|
| - bool ret = base::StringToInt(unique_id.substr(0, colon_index), &category);
|
| - DCHECK(ret) << "Non-numeric category part in unique_id: " << unique_id;
|
| - return FromIDValue(category);
|
| -}
|
| -
|
| -std::string CategoryFactory::GetWithinCategoryIDFromUniqueID(
|
| - const std::string& unique_id) const {
|
| - size_t colon_index = unique_id.find(kSeparator);
|
| - DCHECK_NE(std::string::npos, colon_index) << "Not a valid unique_id: "
|
| - << unique_id;
|
| - return unique_id.substr(colon_index + 1);
|
| -}
|
| -
|
| ////////////////////////////////////////////////////////////////////////////////
|
| // Private methods
|
|
|
|
|