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

Side by Side Diff: chrome/browser/browsing_data/cookies_tree_model.cc

Issue 23658056: content: Move kHttpScheme constant into content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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) 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 #include "chrome/browser/browsing_data/cookies_tree_model.h" 5 #include "chrome/browser/browsing_data/cookies_tree_model.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <functional> 8 #include <functional>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 1064 matching lines...) Expand 10 before | Expand all | Expand 10 after
1075 notifier->StartBatchUpdate(); 1075 notifier->StartBatchUpdate();
1076 for (CookieList::iterator it = container->cookie_list_.begin(); 1076 for (CookieList::iterator it = container->cookie_list_.begin();
1077 it != container->cookie_list_.end(); ++it) { 1077 it != container->cookie_list_.end(); ++it) {
1078 std::string source_string = it->Source(); 1078 std::string source_string = it->Source();
1079 if (source_string.empty() || !group_by_cookie_source_) { 1079 if (source_string.empty() || !group_by_cookie_source_) {
1080 std::string domain = it->Domain(); 1080 std::string domain = it->Domain();
1081 if (domain.length() > 1 && domain[0] == '.') 1081 if (domain.length() > 1 && domain[0] == '.')
1082 domain = domain.substr(1); 1082 domain = domain.substr(1);
1083 1083
1084 // We treat secure cookies just the same as normal ones. 1084 // We treat secure cookies just the same as normal ones.
1085 source_string = std::string(chrome::kHttpScheme) + 1085 source_string = std::string(content::kHttpScheme) +
1086 content::kStandardSchemeSeparator + domain + "/"; 1086 content::kStandardSchemeSeparator + domain + "/";
1087 } 1087 }
1088 1088
1089 GURL source(source_string); 1089 GURL source(source_string);
1090 if (!filter.size() || 1090 if (!filter.size() ||
1091 (CookieTreeHostNode::TitleForUrl(source).find(filter) != 1091 (CookieTreeHostNode::TitleForUrl(source).find(filter) !=
1092 string16::npos)) { 1092 string16::npos)) {
1093 CookieTreeHostNode* host_node = root->GetOrCreateHostNode(source); 1093 CookieTreeHostNode* host_node = root->GetOrCreateHostNode(source);
1094 CookieTreeCookiesNode* cookies_node = 1094 CookieTreeCookiesNode* cookies_node =
1095 host_node->GetOrCreateCookiesNode(); 1095 host_node->GetOrCreateCookiesNode();
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
1328 1328
1329 void CookiesTreeModel::NotifyObserverEndBatch() { 1329 void CookiesTreeModel::NotifyObserverEndBatch() {
1330 // Only notify the observers if this is the outermost call to EndBatch() if 1330 // Only notify the observers if this is the outermost call to EndBatch() if
1331 // called in a nested manner. 1331 // called in a nested manner.
1332 if (--batch_update_ == 0) { 1332 if (--batch_update_ == 0) {
1333 FOR_EACH_OBSERVER(Observer, 1333 FOR_EACH_OBSERVER(Observer,
1334 cookies_observer_list_, 1334 cookies_observer_list_,
1335 TreeModelEndBatch(this)); 1335 TreeModelEndBatch(this));
1336 } 1336 }
1337 } 1337 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698