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

Side by Side Diff: chrome/browser/ui/webui/cookies_tree_model_adapter.cc

Issue 7647026: base: Add three helper functions to Values API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix a typo Ceate -> Create Created 9 years, 4 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #include "chrome/browser/ui/webui/cookies_tree_model_adapter.h" 5 #include "chrome/browser/ui/webui/cookies_tree_model_adapter.h"
6 6
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "base/string_number_conversions.h" 8 #include "base/string_number_conversions.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "chrome/browser/ui/webui/cookies_tree_model_util.h" 10 #include "chrome/browser/ui/webui/cookies_tree_model_util.h"
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 scoped_ptr<Value> parend_id(GetTreeNodeId(model_->AsNode(parent))); 121 scoped_ptr<Value> parend_id(GetTreeNodeId(model_->AsNode(parent)));
122 ListValue children; 122 ListValue children;
123 cookies_tree_model_util::GetChildNodeList(parent, 0, parent->child_count(), 123 cookies_tree_model_util::GetChildNodeList(parent, 0, parent->child_count(),
124 &children); 124 &children);
125 web_ui_->CallJavascriptFunction("ui.CookiesTree.setChildren", 125 web_ui_->CallJavascriptFunction("ui.CookiesTree.setChildren",
126 tree_id, *parend_id.get(), children); 126 tree_id, *parend_id.get(), children);
127 } 127 }
128 128
129 Value* CookiesTreeModelAdapter::GetTreeNodeId(CookieTreeNode* node) { 129 Value* CookiesTreeModelAdapter::GetTreeNodeId(CookieTreeNode* node) {
130 if (node == model_->GetRoot()) 130 if (node == model_->GetRoot())
131 return Value::CreateNullValue(); 131 return base::NullValue();
132 132
133 return Value::CreateStringValue( 133 return Value::CreateStringValue(
134 cookies_tree_model_util::GetTreeNodeId(node)); 134 cookies_tree_model_util::GetTreeNodeId(node));
135 } 135 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/shell_dialogs_unittest.cc ('k') | chrome/browser/ui/webui/net_internals_ui_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698