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

Unified Diff: chrome/browser/bookmarks/bookmark_html_writer.cc

Issue 106433007: Update some uses of Value in chrome/browser to use the base:: namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/bookmarks/bookmark_html_writer.cc
diff --git a/chrome/browser/bookmarks/bookmark_html_writer.cc b/chrome/browser/bookmarks/bookmark_html_writer.cc
index 6de025939e25cd8fd0eb7cdff85f5e6c897f89cc..d0c9f4358d61d067b48eab89d457f36916b162cd 100644
--- a/chrome/browser/bookmarks/bookmark_html_writer.cc
+++ b/chrome/browser/bookmarks/bookmark_html_writer.cc
@@ -102,40 +102,41 @@ class Writer : public base::RefCountedThreadSafe<Writer> {
if (!OpenFile())
return;
- Value* roots = NULL;
+ base::Value* roots = NULL;
if (!Write(kHeader) ||
- bookmarks_->GetType() != Value::TYPE_DICTIONARY ||
- !static_cast<DictionaryValue*>(bookmarks_.get())->Get(
+ bookmarks_->GetType() != base::Value::TYPE_DICTIONARY ||
+ !static_cast<base::DictionaryValue*>(bookmarks_.get())->Get(
BookmarkCodec::kRootsKey, &roots) ||
- roots->GetType() != Value::TYPE_DICTIONARY) {
+ roots->GetType() != base::Value::TYPE_DICTIONARY) {
NOTREACHED();
return;
}
- DictionaryValue* roots_d_value = static_cast<DictionaryValue*>(roots);
- Value* root_folder_value;
- Value* other_folder_value = NULL;
- Value* mobile_folder_value = NULL;
+ base::DictionaryValue* roots_d_value =
+ static_cast<base::DictionaryValue*>(roots);
+ base::Value* root_folder_value;
+ base::Value* other_folder_value = NULL;
+ base::Value* mobile_folder_value = NULL;
if (!roots_d_value->Get(BookmarkCodec::kRootFolderNameKey,
&root_folder_value) ||
- root_folder_value->GetType() != Value::TYPE_DICTIONARY ||
+ root_folder_value->GetType() != base::Value::TYPE_DICTIONARY ||
!roots_d_value->Get(BookmarkCodec::kOtherBookmarkFolderNameKey,
&other_folder_value) ||
- other_folder_value->GetType() != Value::TYPE_DICTIONARY ||
+ other_folder_value->GetType() != base::Value::TYPE_DICTIONARY ||
!roots_d_value->Get(BookmarkCodec::kMobileBookmarkFolderNameKey,
&mobile_folder_value) ||
- mobile_folder_value->GetType() != Value::TYPE_DICTIONARY) {
+ mobile_folder_value->GetType() != base::Value::TYPE_DICTIONARY) {
NOTREACHED();
return; // Invalid type for root folder and/or other folder.
}
IncrementIndent();
- if (!WriteNode(*static_cast<DictionaryValue*>(root_folder_value),
+ if (!WriteNode(*static_cast<base::DictionaryValue*>(root_folder_value),
BookmarkNode::BOOKMARK_BAR) ||
- !WriteNode(*static_cast<DictionaryValue*>(other_folder_value),
+ !WriteNode(*static_cast<base::DictionaryValue*>(other_folder_value),
BookmarkNode::OTHER_NODE) ||
- !WriteNode(*static_cast<DictionaryValue*>(mobile_folder_value),
+ !WriteNode(*static_cast<base::DictionaryValue*>(mobile_folder_value),
BookmarkNode::MOBILE)) {
return;
}
@@ -242,7 +243,7 @@ class Writer : public base::RefCountedThreadSafe<Writer> {
}
// Writes the node and all its children, returning true on success.
- bool WriteNode(const DictionaryValue& value,
+ bool WriteNode(const base::DictionaryValue& value,
BookmarkNode::Type folder_type) {
std::string title, date_added_string, type_string;
if (!value.GetString(BookmarkCodec::kNameKey, &title) ||
@@ -294,11 +295,11 @@ class Writer : public base::RefCountedThreadSafe<Writer> {
// Folder.
std::string last_modified_date;
- const Value* child_values = NULL;
+ const base::Value* child_values = NULL;
if (!value.GetString(BookmarkCodec::kDateModifiedKey,
&last_modified_date) ||
!value.Get(BookmarkCodec::kChildrenKey, &child_values) ||
- child_values->GetType() != Value::TYPE_LIST) {
+ child_values->GetType() != base::Value::TYPE_LIST) {
NOTREACHED();
return false;
}
@@ -333,15 +334,16 @@ class Writer : public base::RefCountedThreadSafe<Writer> {
}
// Write the children.
- const ListValue* children = static_cast<const ListValue*>(child_values);
+ const base::ListValue* children =
+ static_cast<const base::ListValue*>(child_values);
for (size_t i = 0; i < children->GetSize(); ++i) {
- const Value* child_value;
+ const base::Value* child_value;
if (!children->Get(i, &child_value) ||
- child_value->GetType() != Value::TYPE_DICTIONARY) {
+ child_value->GetType() != base::Value::TYPE_DICTIONARY) {
NOTREACHED();
return false;
}
- if (!WriteNode(*static_cast<const DictionaryValue*>(child_value),
+ if (!WriteNode(*static_cast<const base::DictionaryValue*>(child_value),
BookmarkNode::FOLDER)) {
return false;
}
@@ -359,9 +361,9 @@ class Writer : public base::RefCountedThreadSafe<Writer> {
return true;
}
- // The BookmarkModel as a Value. This value was generated from the
+ // The BookmarkModel as a base::Value. This value was generated from the
// BookmarkCodec.
- scoped_ptr<Value> bookmarks_;
+ scoped_ptr<base::Value> bookmarks_;
// Path we're writing to.
base::FilePath path_;
« no previous file with comments | « chrome/browser/bookmarks/bookmark_expanded_state_tracker.cc ('k') | chrome/browser/bookmarks/bookmark_storage.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698