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

Unified Diff: chrome/browser/ui/webui/cookies_tree_model_util.h

Issue 6611030: Move cookies tree model helper code into cookies_tree_model_util. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix typo Created 9 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/ui/webui/cookies_tree_model_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/cookies_tree_model_util.h
diff --git a/chrome/browser/ui/webui/cookies_tree_model_util.h b/chrome/browser/ui/webui/cookies_tree_model_util.h
new file mode 100644
index 0000000000000000000000000000000000000000..6e4c1b390a95bb1818ed8c2fc23f2e6b1d60a0f7
--- /dev/null
+++ b/chrome/browser/ui/webui/cookies_tree_model_util.h
@@ -0,0 +1,34 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_UI_WEBUI_COOKIES_TREE_MODEL_UTIL_H_
+#define CHROME_BROWSER_UI_WEBUI_COOKIES_TREE_MODEL_UTIL_H_
+#pragma once
+
+#include <string>
+
+class CookieTreeNode;
+class DictionaryValue;
+class ListValue;
+
+namespace cookies_tree_model_util {
+
+// Returns tree node id. Currently use hex string of node pointer as id.
+std::string GetTreeNodeId(CookieTreeNode* node);
+
+// Populate given |dict| with cookie tree node properties.
+void GetCookieTreeNodeDictionary(const CookieTreeNode& node,
+ DictionaryValue* dict);
+
+// Append the children nodes of |parent| in specified range to |nodes| list.
+void GetChildNodeList(CookieTreeNode* parent, int start, int count,
+ ListValue* nodes);
+
+// Gets tree node from |path| under |root|. Return NULL if |path| is not valid.
+CookieTreeNode* GetTreeNodeFromPath(CookieTreeNode* root,
+ const std::string& path);
+
+} // namespace cookies_tree_model_util
+
+#endif // CHROME_BROWSER_UI_WEBUI_COOKIES_TREE_MODEL_UTIL_H_
« no previous file with comments | « no previous file | chrome/browser/ui/webui/cookies_tree_model_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698