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

Side by Side Diff: base/nullable_string16.h

Issue 174484: Add a nullable string16 class to base. It combines a string16 + a null param... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' 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 | Annotate | Revision Log
« no previous file with comments | « base/base.gyp ('k') | chrome/browser/in_process_webkit/dom_storage_dispatcher_host.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 // Copyright (c) 2009 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 #ifndef BASE_NULLABLE_STRING16_H_
6 #define BASE_NULLABLE_STRING16_H_
7
8 #include "base/string16.h"
9
10 // This class is a simple wrapper for string16 which also contains a null
11 // state. This should be used only where the difference between null and
12 // empty is meaningful.
13 class NullableString16 {
14 public:
15 NullableString16() : is_null_(false) { }
16 NullableString16(const string16& string, bool is_null)
17 : string_(string), is_null_(is_null) {
18 }
19
20 const string16& string() const { return string_; }
21 bool is_null() const { return is_null_; }
22
23 private:
24 string16 string_;
25 bool is_null_;
26 };
27
28 #endif // BASE_NULLABLE_STRING16_H_
OLDNEW
« no previous file with comments | « base/base.gyp ('k') | chrome/browser/in_process_webkit/dom_storage_dispatcher_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698