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

Side by Side Diff: chrome/browser/dom_ui/options/cookies_view_handler.cc

Issue 3750001: base: Move SplitString functions into the base namespace and update the callers. (Closed) Base URL: git://git.chromium.org/chromium.git
Patch Set: brett review, reverted changes in o3d due to it's using an old base revision Created 10 years, 2 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
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/dom_ui/options/cookies_view_handler.h" 5 #include "chrome/browser/dom_ui/options/cookies_view_handler.h"
6 6
7 #include "app/l10n_util.h" 7 #include "app/l10n_util.h"
8 #include "base/i18n/time_formatting.h" 8 #include "base/i18n/time_formatting.h"
9 #include "base/string_number_conversions.h" 9 #include "base/string_number_conversions.h"
10 #include "base/string_split.h" 10 #include "base/string_split.h"
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 } 363 }
364 364
365 CookieTreeNode* node = GetTreeNodeFromPath(node_path); 365 CookieTreeNode* node = GetTreeNodeFromPath(node_path);
366 if (node) 366 if (node)
367 SendChildren(node); 367 SendChildren(node);
368 } 368 }
369 369
370 CookieTreeNode* CookiesViewHandler::GetTreeNodeFromPath( 370 CookieTreeNode* CookiesViewHandler::GetTreeNodeFromPath(
371 const std::string& path) { 371 const std::string& path) {
372 std::vector<std::string> node_ids; 372 std::vector<std::string> node_ids;
373 SplitString(path, ',', &node_ids); 373 base::SplitString(path, ',', &node_ids);
374 374
375 CookieTreeNode* child = NULL; 375 CookieTreeNode* child = NULL;
376 CookieTreeNode* parent = cookies_tree_model_->GetRoot(); 376 CookieTreeNode* parent = cookies_tree_model_->GetRoot();
377 int child_index = -1; 377 int child_index = -1;
378 378
379 // Validate the tree path and get the node pointer. 379 // Validate the tree path and get the node pointer.
380 for (size_t i = 0; i < node_ids.size(); ++i) { 380 for (size_t i = 0; i < node_ids.size(); ++i) {
381 child = reinterpret_cast<CookieTreeNode*>( 381 child = reinterpret_cast<CookieTreeNode*>(
382 HexStringToPointer(node_ids[i])); 382 HexStringToPointer(node_ids[i]));
383 383
(...skipping 12 matching lines...) Expand all
396 GetChildNodeList(parent, 0, parent->GetChildCount(), children); 396 GetChildNodeList(parent, 0, parent->GetChildCount(), children);
397 397
398 ListValue args; 398 ListValue args;
399 args.Append(parent == cookies_tree_model_->GetRoot() ? 399 args.Append(parent == cookies_tree_model_->GetRoot() ?
400 Value::CreateNullValue() : 400 Value::CreateNullValue() :
401 Value::CreateStringValue(PointerToHexString(parent))); 401 Value::CreateStringValue(PointerToHexString(parent)));
402 args.Append(children); 402 args.Append(children);
403 403
404 dom_ui_->CallJavascriptFunction(L"CookiesView.loadChildren", args); 404 dom_ui_->CallJavascriptFunction(L"CookiesView.loadChildren", args);
405 } 405 }
OLDNEW
« no previous file with comments | « chrome/browser/dom_ui/new_tab_page_sync_handler.cc ('k') | chrome/browser/download/download_prefs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698