Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(571)

Side by Side Diff: net/base/net_module.h

Issue 193072: Move StringPiece into the base namespace. It is colliding (Closed)
Patch Set: take 2 Created 11 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/tools/mac_helpers/infoplist_strings_util.mm ('k') | net/base/net_module.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef NET_BASE_NET_MODULE_H__ 5 #ifndef NET_BASE_NET_MODULE_H__
6 #define NET_BASE_NET_MODULE_H__ 6 #define NET_BASE_NET_MODULE_H__
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/string_piece.h" 9 #include "base/string_piece.h"
10 10
11 namespace net { 11 namespace net {
12 12
13 // Defines global initializers and associated methods for the net module. 13 // Defines global initializers and associated methods for the net module.
14 // 14 //
15 // The network module does not have direct access to the way application 15 // The network module does not have direct access to the way application
16 // resources are stored and fetched by the embedding application (e.g., it 16 // resources are stored and fetched by the embedding application (e.g., it
17 // cannot see the ResourceBundle class used by Chrome), so it uses this API to 17 // cannot see the ResourceBundle class used by Chrome), so it uses this API to
18 // get access to such resources. 18 // get access to such resources.
19 // 19 //
20 class NetModule { 20 class NetModule {
21 public: 21 public:
22 typedef StringPiece (*ResourceProvider)(int key); 22 typedef base::StringPiece (*ResourceProvider)(int key);
23 23
24 // Set the function to call when the net module needs resources 24 // Set the function to call when the net module needs resources
25 static void SetResourceProvider(ResourceProvider func); 25 static void SetResourceProvider(ResourceProvider func);
26 26
27 // Call the resource provider (if one exists) to get the specified resource. 27 // Call the resource provider (if one exists) to get the specified resource.
28 // Returns an empty string if the resource does not exist or if there is no 28 // Returns an empty string if the resource does not exist or if there is no
29 // resource provider. 29 // resource provider.
30 static StringPiece GetResource(int key); 30 static base::StringPiece GetResource(int key);
31 31
32 private: 32 private:
33 DISALLOW_IMPLICIT_CONSTRUCTORS(NetModule); 33 DISALLOW_IMPLICIT_CONSTRUCTORS(NetModule);
34 }; 34 };
35 35
36 } // namespace net 36 } // namespace net
37 37
38 #endif // NET_BASE_NET_MODULE_H__ 38 #endif // NET_BASE_NET_MODULE_H__
OLDNEW
« no previous file with comments | « chrome/tools/mac_helpers/infoplist_strings_util.mm ('k') | net/base/net_module.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698