OLD | NEW |
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/options/cookies_view_handler.h" | 5 #include "chrome/browser/ui/webui/options/cookies_view_handler.h" |
6 | 6 |
7 #include "base/utf_string_conversions.h" | 7 #include "base/utf_string_conversions.h" |
8 #include "base/values.h" | 8 #include "base/values.h" |
9 #include "chrome/browser/browsing_data_appcache_helper.h" | 9 #include "chrome/browser/browsing_data_appcache_helper.h" |
10 #include "chrome/browser/browsing_data_database_helper.h" | 10 #include "chrome/browser/browsing_data_database_helper.h" |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 DCHECK(batch_update_); | 135 DCHECK(batch_update_); |
136 batch_update_ = false; | 136 batch_update_ = false; |
137 | 137 |
138 SendChildren(cookies_tree_model_->GetRoot()); | 138 SendChildren(cookies_tree_model_->GetRoot()); |
139 } | 139 } |
140 | 140 |
141 void CookiesViewHandler::EnsureCookiesTreeModelCreated() { | 141 void CookiesViewHandler::EnsureCookiesTreeModelCreated() { |
142 if (!cookies_tree_model_.get()) { | 142 if (!cookies_tree_model_.get()) { |
143 Profile* profile = web_ui_->GetProfile(); | 143 Profile* profile = web_ui_->GetProfile(); |
144 cookies_tree_model_.reset(new CookiesTreeModel( | 144 cookies_tree_model_.reset(new CookiesTreeModel( |
145 profile->GetRequestContext()->DONTUSEME_GetCookieStore()-> | 145 new BrowsingDataCookieHelper(profile), |
146 GetCookieMonster(), | |
147 new BrowsingDataDatabaseHelper(profile), | 146 new BrowsingDataDatabaseHelper(profile), |
148 new BrowsingDataLocalStorageHelper(profile), | 147 new BrowsingDataLocalStorageHelper(profile), |
149 NULL, | 148 NULL, |
150 new BrowsingDataAppCacheHelper(profile), | 149 new BrowsingDataAppCacheHelper(profile), |
151 BrowsingDataIndexedDBHelper::Create(profile), | 150 BrowsingDataIndexedDBHelper::Create(profile), |
152 BrowsingDataFileSystemHelper::Create(profile), | 151 BrowsingDataFileSystemHelper::Create(profile), |
153 false)); | 152 false)); |
154 cookies_tree_model_->AddCookiesTreeObserver(this); | 153 cookies_tree_model_->AddCookiesTreeObserver(this); |
155 } | 154 } |
156 } | 155 } |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 children); | 204 children); |
206 | 205 |
207 ListValue args; | 206 ListValue args; |
208 args.Append(parent == cookies_tree_model_->GetRoot() ? | 207 args.Append(parent == cookies_tree_model_->GetRoot() ? |
209 Value::CreateNullValue() : | 208 Value::CreateNullValue() : |
210 Value::CreateStringValue(cookies_tree_model_util::GetTreeNodeId(parent))); | 209 Value::CreateStringValue(cookies_tree_model_util::GetTreeNodeId(parent))); |
211 args.Append(children); | 210 args.Append(children); |
212 | 211 |
213 web_ui_->CallJavascriptFunction("CookiesView.loadChildren", args); | 212 web_ui_->CallJavascriptFunction("CookiesView.loadChildren", args); |
214 } | 213 } |
OLD | NEW |