Todo List

File mock_time_cache.h
TODO(jmarantz): consider refactoring this as a subclass of DelayCache.

Namespace net_instaweb

TODO(sligocki): Find a way to forward declare FileSystem::InputFile.

TODO(skerner): include image_spriter.pb.h is needed to allow use of enum ImageFormat. Break this dependency and remove the include.

Member net_instaweb::ApacheResourceManager::PollFilesystemForCacheFlush ()

TODO(jmarantz): allow configuration of this option.

TODO(jmarantz): allow a URL-based mechanism to flush cache, even if we implement it by simply writing the cache.flush file so other servers can see it. Note that using shared-memory is not a great plan because we need the cache-invalidation to persist across server restart.

Member net_instaweb::AsyncFetch::IsCachedResultValid (const ResponseHeaders &headers)
TODO(nikhilmadan): Consider making this virtual so that subclass authors are forced to look at this function.

Member net_instaweb::AsyncFetch::Reset ()
TODO(jmarantz): should this also clear the response headers?

Class net_instaweb::BlinkCriticalLineDataFinder
TODO(pulkitg): Rethink about the naming and structure of this class.

Class net_instaweb::CacheExtender
TODO(jmarantz): rename this class to something more generic, like RenameUrlFilter or ProxyUrlFilter.

Class net_instaweb::CacheUrlAsyncFetcher
TODO(sligocki): In order to use this for fetching resources for rewriting we'd need to integrate resource locking in this class. Do we want that?

Class net_instaweb::CollapseWhitespaceFilter
TODO(mdsteele): Use the CSS parser (once it's finished) to try to intelligently determine when the CSS "white-space: pre" property is in use; that would make this filter much safer.

Member net_instaweb::ContentType::file_extension () const
TODO(sligocki): Stop returning '.' in file_extension().

Namespace net_instaweb::css_util
TODO(nforman): remove this namespace and put everything into the StyleExtractor class.

Member net_instaweb::CssFilter::CssFilter (RewriteDriver *driver, CacheExtender *cache_extender, ImageRewriteFilter *image_rewriter, ImageCombineFilter *image_combiner)
TODO(sligocki): Temporary pattern until we figure out a better way to do this without passing all filters around everywhere.

Member net_instaweb::CssHierarchy::CheckCharsetOk (const ResourcePtr &resource)
TODO(matterbury): A potential future enhancement is to allow 'compatible' charsets, like a US-ASCII child in a UTF-8 parent, since US-ASCII is a subset of UTF-8.

Member net_instaweb::CssRewriteTestBase::kNoClearFetcher
TODO(sligocki): Why would we ever want to clear fetcher?

Member net_instaweb::CssRewriteTestBase::kNoOtherContexts
TODO(sligocki): Explain why we turn off other contexts.

Member net_instaweb::CssRewriteTestBase::kNoStatCheck
TODO(sligocki): Explain why we turn off stats check at each use-site.

Class net_instaweb::DivStructureFilter
TODO(jhoch): Next step is to encode/condense these parameter values (at the very least use a base higher than 10).

Member net_instaweb::DocType::kUnknown
TODO(mdsteele): Add more such methods as necessary.

Member net_instaweb::FileLoadPolicy::ShouldLoadFromFile (const GoogleUrl &url, GoogleString *filename) const
TODO(sligocki): Set up a more efficient mapper.

Class net_instaweb::FileRewriter
TODO(jmarantz): fill out enough functionality so that this will be a functional static rewriter that could optimize an HTML file passed as a command-line parameter or via stdin.

Member net_instaweb::FileSystem::Atime (const StringPiece &path, int64 *timestamp_sec, MessageHandler *handler)=0
TODO(abliss): replace this with a single Stat() function.

Member net_instaweb::FileSystem::InputFile::Read (char *buf, int size, MessageHandler *handler)=0
TODO(sligocki): Perhaps this should be renamed to avoid confusing that it returns a bool to indicate success like all other Read methods in our codebase.

Member net_instaweb::FileSystem::OutputFile::Write (const StringPiece &buf, MessageHandler *handler)=0
TODO(sligocki): Would we like a version that returns the amound written? If so, it should be named so that it is clear it is returning int.

Member net_instaweb::FileSystem::RecursiveDirSize (const StringPiece &path, int64 *size, MessageHandler *handler)
TODO(abliss): unify all slash-ending assumptions

Member net_instaweb::FileSystem::Size (const StringPiece &path, int64 *size, MessageHandler *handler)=0
TODO(abliss): replace this with a single Stat() function.

Member net_instaweb::FileSystem::WriteFileAtomic (const StringPiece &filename, const StringPiece &buffer, MessageHandler *handler)
TODO(sligocki): Use thoughout code where appropriate.

Member net_instaweb::GoogleUrl::SchemeIs (const StringPiece &lower_ascii_scheme) const
TODO(nforman): get GURL to take a StringPiece so we don't have to do any copying.

Member net_instaweb::HasPrefixString (const StringPiece &str, const StringPiece &prefix)
TODO(jmarantz): Eliminate these definitions of HasPrefixString, UpperString, and LowerString, and re-add dependency on protobufs which also provide definitions for these.

Member net_instaweb::Headers::Lookup (const StringPiece &name, ConstStringStarVector *values) const
TODO(jmarantz): this is a problem waiting to happen, but I believe it will not be a problem in the immediate future. We can refactor our way around this problem by moving the Map to an explicit separate class that can be instantiated to assist with Lookups and Remove. But that should be done in a separate CL from the one I'm typing into now.

Member net_instaweb::HtmlElement::AddAttribute (const HtmlName &name, const StringPiece &decoded_value, QuoteStyle quote_style)

TODO(sligocki): StringPiece(NULL) seems fragile because what it is or how it's treated is not docutmented.

Member net_instaweb::HtmlElement::Attribute::SetValue (const StringPiece &value)
TODO(mdsteele): Perhaps we should check for this?

Member net_instaweb::HtmlFilter::IEDirective (HtmlIEDirectiveNode *directive)=0
TODO(mdsteele): Should we try to maintain the nested structure of the conditionals, in the same way that we maintain nesting of elements?

Member net_instaweb::HtmlFilter::StartElement (HtmlElement *element)=0
TODO(jmarantz): consider passing handles rather than pointers and reference-counting them instead to save memory on long documents.

Member net_instaweb::HtmlKeywords::Unescape (const StringPiece &escaped, GoogleString *buf, bool *decoding_error)
TODO(jmarantz): Support a variant where we unescape to UTF-8.

Class net_instaweb::HtmlLexer
TODO(jmarantz): refactor this with html_parse, so that this class owns the symbol table and the event queue, and no longer needs to mutually depend on HtmlParse. That will make it easier to unit-test.

Member net_instaweb::HtmlNode::HtmlNode (HtmlElement *parent)
TODO(jmarantz): jmaessen suggests instantiating the html nodes without parents and computing them from context at the time they are instantiated from the lexer. This is a little more difficult when synthesizing new nodes, however. We assert sanity, however, when calling HtmlParse::ApplyFilter.

Class net_instaweb::HtmlParse
TODO(jmarantz): rename HtmlParse to HtmlContext. The actual parsing occurs in HtmlLexer, and this class is dominated by methods to manipulate DOM as it streams through.

Member net_instaweb::HtmlParse::InsertElementBeforeElement (const HtmlNode *existing_node, HtmlNode *new_node)

TODO(sligocki): Find Javascript equivalents and list them or even change our names to be consistent.

TODO(mdsteele): Rename these methods to e.g. InsertNodeBeforeNode. This and downstream filters will then see inserted elements but upstream filters will not. Note: In Javascript the first is called insertBefore and takes the arg in the opposite order. Note: new_node must not already be in the DOM.

Class net_instaweb::HttpAttributes
TODO(jmarantz): proactively change all the occurences of the static strings to use these shared constants.

Class net_instaweb::HTTPCache::Callback
TODO(jmarantz): consider inheriting from AsyncFetch with an implementation of Write/Flush/HeadersComplete -- we'd have to make Done take true/false so this would impact callers.

Member net_instaweb::HTTPCache::Callback::http_value ()
TODO(jmarantz): specify the dataflow between http_value and response_headers.

Class net_instaweb::HttpDumpUrlFetcher
TODO(sligocki): Can we forward declare these somehow? class FileSystem; class FileSystem::InputFile;

Member net_instaweb::HttpResponseParser::Parse (FILE *stream)
TODO(sligocki): We need a Readable abstraction (like Writer)

Class net_instaweb::ImageRewriteFilter
TODO(jmaessen): Big open question: how best to link pulled-in resources to rewritten urls, when in general those urls will be in a different domain.

Member net_instaweb::instaweb_handler (request_rec *request)
TODO(sligocki): Use a Page Speed Automatic ResourceFetch here.

Class net_instaweb::InstawebContext
TODO(sligocki): Factor out similarities between this and ProxyFetch.

Member net_instaweb::InstawebContext::ManagerFromServerRec (server_rec *server)
TODO(jmarantz): Is there a better place to put this? It needs to be used by both mod_instaweb.cc and instaweb_handler.cc.

Member net_instaweb::InstawebContext::response_headers ()
TODO(jmarantz): needed?

Class net_instaweb::JavascriptCodeBlock

TODO(jmaessen): Does this architecture make sense when we have multiple scripts on a page and the ability to move code around a bunch? How do we maintain JS context in that setting?

Member net_instaweb::JavascriptCodeBlock::Rewritten ()
TODO(jmaessen): Other questions we might reasonably ask: Can this code be floated downwards?

Class net_instaweb::LRUCache
TODO(jmarantz): The Put interface does not currently stream, but this should be added.

Member net_instaweb::LRUCache::Put (const GoogleString &key, SharedString *new_value)
TODO(jmarantz): currently if the caller mutates the SharedString after having called Put, it will actually modify the value in the cache. We should change SharedString to Copy-On-Write semantics.

Class net_instaweb::MemFileSystem

TODO(abliss): add an ability to block writes for arbitrarily long, to enable testing resilience to concurrency problems with real filesystems.

TODO(jmarantz): make threadsafe.

Member net_instaweb::MessageHandler::Info (const char *filename, int line, const char *msg,...) INSTAWEB_PRINTF_FORMAT(4
TODO(sligocki): Rename these to InfoAt, ... so that Info, ... can be used for general Messages.

Member net_instaweb::OutputResource::OutputResource (ResourceManager *resource_manager, const StringPiece &resolved_base, const StringPiece &unmapped_base, const StringPiece &original_base, const ResourceNamer &resource_id, const RewriteOptions *options, OutputResourceKind kind)

TODO(jmaessen): remove redundancy.

Member net_instaweb::PLAIN
TODO(jmaessen): implement non-BASE64 encodings. UTF8,

Class net_instaweb::ProxyInterface
TODO(sligocki): Rename as per style-guide.

Member net_instaweb::Resource::CacheExpirationTimeMs () const
TODO(sligocki): Look through callsites and make sure this is being interpreted correctly.

Member net_instaweb::Resource::loaded () const
TODO(sligocki): Do we need these or can we just use IsValidAndCacheable everywhere?

Member net_instaweb::ResourceCombiner::AddResourceNoFetch (const ResourcePtr &resource, MessageHandler *handler)
TODO(jmarantz): rename this to AddResource now that async flow is live.

Member net_instaweb::ResourceCombiner::kUrlSlack
TODO(sligocki): Set this more intelligently.

Class net_instaweb::ResourceFetch
TODO(sligocki): Rename to ProxyResourceFetch or something else ...

Class net_instaweb::ResourceManager
TODO(jmarantz): Rename this class to ServerContext, as it no longer contains much logic about resources -- that's been moved to RewriteDriver, which should be renamed RequestContext.

Member net_instaweb::ResourceManager::hasher () const
TODO(jmarantz): check thread safety in Apache.

Member net_instaweb::ResourceManager::MergeNonCachingResponseHeaders (const ResourcePtr &input, const OutputResourcePtr &output)
TODO(jmarantz): avoid setting caching_dirty bit in ResponseHeaders when the header is not caching-related.

Member net_instaweb::ResourceManager::ReleaseRewriteDriver (RewriteDriver *rewrite_driver)
TODO(jmarantz): this cannot recycle RewriteDrivers with custom rewrite options, which is a potential performance issue for Apache installations that set custom options in .htaccess files, where essentially every RewriteDriver will be a custom driver. To resolve this we need to make a comparator for RewriteOptions so that we can determine option-equivalence and, potentially, keep free-lists for each unique option-set.

Member net_instaweb::ResourceManager::ShutDownDrivers ()
TODO(jmarantz): Change New*RewriteDriver() calls to return NULL when run after shutdown. This requires changing call-sites to null-check their drivers and gracefully fail.

Member net_instaweb::ResourceManagerTestBase::rewrite_driver ()

TODO(jmarantz): These abstractions are not satisfactory long-term where we want to have driver-lifetime in tests be reflective of how servers work. But for now we use these accessors.

Member net_instaweb::ResourceNamer::set_ext (const StringPiece &e)
TODO(jmaessen): Remove check after transitioning to undotted extensions everywhere.

Class net_instaweb::ResourceSlot
TODO(jmarantz): make this class thread-safe.

Member net_instaweb::ResourceSlot::SetResource (const ResourcePtr &resource)
TODO(jmarantz): Add a lock or that we or an overall protocol preventing unwanted interference between renderer's reads and worker writes.

Member net_instaweb::ResourceTagScanner::set_find_a_tags (bool val)
TODO(jmarantz): merge these two flags (note url_left_trim_filter.cc only sets one currently) and rename to set_find_hyperlinks.

Member net_instaweb::ResponseHeaders::CacheExpirationTimeMs () const
TODO(sligocki): Look through callsites and make sure this is being interpretted correctly.

Member net_instaweb::ResponseHeaders::headers_complete () const
TODO(jmarantz): consider an alternative representation

Class net_instaweb::RewriteContext

TODO(jmarantz): add support for controlling TTL on failures.

Member net_instaweb::RewriteContext::encoder () const
TODO(jmarantz): remove the encoder from RewriteFilter.

Member net_instaweb::RewriteContext::Rewrite (int partition_index, CachedResult *partition, const OutputResourcePtr &output)=0
TODO(jmarantz): check for resource completion from a different thread (while we were waiting for resource fetches) when Rewrite gets called.

Class net_instaweb::RewriteDriver

TODO(jmarantz): rename this class to RequestContext. This extends class HtmlParse (which should renamed HtmlContext) by providing context for rewriting resources (css, js, images).

Member net_instaweb::RewriteDriver::CreateOutputResourceFromResource (const StringPiece &filter_prefix, const UrlSegmentEncoder *encoder, const ResourceContext *data, const ResourcePtr &input_resource, OutputResourceKind kind)
TODO(jmaessen, jmarantz): Do we want to permit NULL input_resources here? jmarantz has evinced a distaste.

Member net_instaweb::RewriteDriver::DecodeOutputResource (const GoogleUrl &url, RewriteFilter **filter) const
TODO(jmaessen): add url hash & check thereof.

Member net_instaweb::RewriteDriver::kDomCohort []
TODO(jmarantz): The "DOM" cohort is here as a placeholder. There's no existing filter that needs this yet, although a pending test in proxy_interface_test.cc that will need it. If, by the time the PropertyCache comes into use in a product, the DOM cohort is not in use, we should remove it since its presence will cause an extra cache-lookup per HTML request.

Member net_instaweb::RewriteDriver::kPassThroughRequestAttributes [3]
TODO(sligocki): Use these in ProxyInterface flow.

Member net_instaweb::RewriteDriver::response_headers ()
TODO(jmarantz): Change API to require response_headers in StartParse so we can guarantee this is non-null.

Member net_instaweb::RewriteDriver::set_externally_managed (bool x)
TODO(jmarantz): Consider phasing this out to make tests behave more like servers.

Member net_instaweb::RewriteDriver::SetWriter (Writer *writer)
TODO(jmarantz): fix this in the implementation so that the caller can install filters in any order and the writer will always be last.

Member net_instaweb::RewriteDriver::ShouldNotRewriteImages () const
TODO(jmarantz): Another approach to allow rewriting to be friendly to image-search link rel=canonical, described in: http://googlewebmastercentral.blogspot.com/2011/06/ supporting-relcanonical-http-headers.html

Member net_instaweb::RewriteDriverFactory::hasher ()
TODO(sligocki): Remove hasher() and force people to make a NewHasher when they need one.

Member net_instaweb::RewriteOptions::css_outline_min_bytes () const
TODO(jmarantz): consider setting flags in the set_ methods so that first's explicit settings can override default values from second.

Member net_instaweb::RewriteOptions::DisallowTroublesomeResources ()
TODO(sligocki): Rename to allow for more general initialization.

Member net_instaweb::RewriteQuery::Scan (RewriteDriverFactory *factory, GoogleUrl *request_url, RequestHeaders *request_headers, scoped_ptr< RewriteOptions > *options, MessageHandler *handler)
TODO(jmarantz): consider allowing an alternative prefix to "ModPagespeed" to accomodate other Page Speed Automatic applications that might want to brand differently.

Class net_instaweb::SerfUrlAsyncFetcher
TODO(sligocki): Serf does not seem to act appropriately in IPv6 environments, fix and test this. Specifically: (1) It does not attempt to fall-back to IPv4 if IPv6 connection fails; (2) It may not correctly signal failure, which causes the incoming connection to hang.

Class net_instaweb::SharedDynamicStringMap
TODO(jhoch): make map dynamically sized

Class net_instaweb::SharedMemLockManager
TODO(morlovich): Implement condvars?

Class net_instaweb::SharedMemVariable

TODO(abliss): actually do this.

Member net_instaweb::spriter::ImageLibraryInterface::FilePath
TODO(skerner): Chromium's base lib has a class FilePath that handles paths in a cross-platform way. Use it.

Member net_instaweb::StrCat (const StringPiece &a, const StringPiece &b, const StringPiece &c=EmptyStringkEmptyString, const StringPiece &d=EmptyStringkEmptyString, const StringPiece &e=EmptyStringkEmptyString, const StringPiece &f=EmptyStringkEmptyString, const StringPiece &g=EmptyStringkEmptyString, const StringPiece &h=EmptyStringkEmptyString)
TODO(jmarantz): use overloading instead of default args and get rid of this statically constructed global object.

Class net_instaweb::StringAsyncFetch
TODO(jmarantz): move StringAsyncFetch into its own file.

Member net_instaweb::StringOutputStream
TODO(sligocki): Get rid of these special cases.

Member net_instaweb::StringToInt (const char *in, int *out)
TODO(bmcquade): Use char*-based StringToInt once we sync the Chromium repository.

Member net_instaweb::StringToInt64 (const char *in, int64 *out)
TODO(bmcquade): Use char*-based StringToInt64 once we sync the Chromium repository.

Member net_instaweb::StripUtf8Bom (StringPiece *contents)
TODO(nforman): Possibly handle stripping BOMs from non-utf-8 files. We currently handle only utf-8 BOM because we assume the resources we get are not in utf-16 or utf-32 when we read and parse them, anyway.

Class net_instaweb::SymbolTable< CharTransform >
TODO(jmarantz): Symbol tables are not currently thread-safe. We should consider whether it's worth making them thread-safe, or whether it's better to use separate symbol tables in each thread.

Member net_instaweb::UrlAsyncFetcher::ConditionalFetch (const GoogleString &url, int64 if_modified_since_ms, const RequestHeaders &request_headers, ResponseHeaders *response_headers, Writer *response_writer, MessageHandler *message_handler, Callback *callback)
TODO(sligocki): GoogleString -> GoogleUrl

Member net_instaweb::UrlAsyncFetcher::Fetch (const GoogleString &url, MessageHandler *message_handler, AsyncFetch *fetch)
TODO(sligocki): Stick all other params into AsyncFetch object (url, request_headers, response_headers, message_handler).

Member net_instaweb::UrlAsyncFetcher::StreamingFetch (const GoogleString &url, const RequestHeaders &request_headers, ResponseHeaders *response_headers, Writer *response_writer, MessageHandler *message_handler, Callback *callback)

TODO(sligocki): GoogleString -> GoogleUrl

Class net_instaweb::UrlLeftTrimFilter
TODO(jmaessen): Do we care to introduce ../ in order to relativize more urls? For example, if base URL is http://www.example.com/foo/bar/index.html we could convert: http://www.example.com/foo/other.html -> ../other.html rather than -> /foo/other.html.

Class net_instaweb::UrlMultipartEncoder

TODO(jmarantz): One possibly improvement is to bake this functionality into UrlEscaper, changing its interface to accept arbitrary numbers of pieces in & out. However, that would change an interface that's used in multiple places, so this is left as a

TODO.

Class net_instaweb::UserAgentMatcher
TODO(sriharis): Split the functionality here into two: a matcher that pulls out all relevent information from UA strings (browser-family, version, mobile/tablet/desktop, etc.), and a query interface that can be used by clients.

Member net_instaweb::UserAgentMatcher::IsMobileUserAgent (const StringPiece &user_agent) const
TODO(sriharis): Remove the need for these two separate functions, and refactor the names.

Member net_instaweb::Variable::Get () const =0
TODO(sligocki): int -> int64

Member net_instaweb::WgetUrlFetcher::StreamingFetchUrl (const GoogleString &url, const RequestHeaders &request_headers, ResponseHeaders *response_headers, Writer *writer, MessageHandler *message_handler)
TODO(sligocki): Allow protocol version number (e.g. HTTP/1.1) and request type (e.g. GET, POST, etc.) to be specified.

File ref_counted_ptr.h
TODO(jmaessen): explore adding C++x0 shared_ptr support

File url_fetcher.h
TODO(jmarantz): Consider asynchronous fetches. This may not require a change in interface; we would simply always return 'false' if the url contents is not already cached. We may want to consider a richer return-value enum to distinguish illegal ULRs from invalid ones, from ones where the fetch is in-progress. Or maybe the caller doesn't care.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Generated on Tue May 29 16:33:45 2012 for Page Speed Optimization Libraries by  doxygen 1.6.3