Home | History | Annotate | Download | only in base
      1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
      2 // Use of this source code is governed by a BSD-style license that can be
      3 // found in the LICENSE file.
      4 
      5 #include "net/base/net_module.h"
      6 
      7 namespace net {
      8 
      9 static NetModule::ResourceProvider resource_provider;
     10 
     11 // static
     12 void NetModule::SetResourceProvider(ResourceProvider func) {
     13   resource_provider = func;
     14 }
     15 
     16 // static
     17 base::StringPiece NetModule::GetResource(int key) {
     18   return resource_provider ? resource_provider(key) : base::StringPiece();
     19 }
     20 
     21 }  // namespace net
     22