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

Side by Side Diff: base/values.h

Issue 22243002: GTTF: Enable glibcxx debug mode for Debug builds by default. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years 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 | « no previous file | base/values.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 // This file specifies a recursive data storage class called Value intended for 5 // This file specifies a recursive data storage class called Value intended for
6 // storing settings and other persistable data. 6 // storing settings and other persistable data.
7 // 7 //
8 // A Value represents something that can be stored in JSON or passed to/from 8 // A Value represents something that can be stored in JSON or passed to/from
9 // JavaScript. As such, it is NOT a generalized variant type, since only the 9 // JavaScript. As such, it is NOT a generalized variant type, since only the
10 // types supported by JavaScript/JSON are supported. 10 // types supported by JavaScript/JSON are supported.
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 void MergeDictionary(const DictionaryValue* dictionary); 341 void MergeDictionary(const DictionaryValue* dictionary);
342 342
343 // Swaps contents with the |other| dictionary. 343 // Swaps contents with the |other| dictionary.
344 virtual void Swap(DictionaryValue* other); 344 virtual void Swap(DictionaryValue* other);
345 345
346 // This class provides an iterator over both keys and values in the 346 // This class provides an iterator over both keys and values in the
347 // dictionary. It can't be used to modify the dictionary. 347 // dictionary. It can't be used to modify the dictionary.
348 class BASE_EXPORT Iterator { 348 class BASE_EXPORT Iterator {
349 public: 349 public:
350 explicit Iterator(const DictionaryValue& target); 350 explicit Iterator(const DictionaryValue& target);
351 ~Iterator();
351 352
352 bool IsAtEnd() const { return it_ == target_.dictionary_.end(); } 353 bool IsAtEnd() const { return it_ == target_.dictionary_.end(); }
353 void Advance() { ++it_; } 354 void Advance() { ++it_; }
354 355
355 const std::string& key() const { return it_->first; } 356 const std::string& key() const { return it_->first; }
356 const Value& value() const { return *it_->second; } 357 const Value& value() const { return *it_->second; }
357 358
358 private: 359 private:
359 const DictionaryValue& target_; 360 const DictionaryValue& target_;
360 ValueMap::const_iterator it_; 361 ValueMap::const_iterator it_;
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
527 528
528 } // namespace base 529 } // namespace base
529 530
530 // http://crbug.com/88666 531 // http://crbug.com/88666
531 using base::DictionaryValue; 532 using base::DictionaryValue;
532 using base::ListValue; 533 using base::ListValue;
533 using base::StringValue; 534 using base::StringValue;
534 using base::Value; 535 using base::Value;
535 536
536 #endif // BASE_VALUES_H_ 537 #endif // BASE_VALUES_H_
OLDNEW
« no previous file with comments | « no previous file | base/values.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698