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

Side by Side Diff: chrome/browser/ui/views/collected_cookies_views.cc

Issue 10636019: Adding Application Data dialog for isolated apps (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed merge conflicts Created 8 years, 5 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/ui/views/collected_cookies_views.h" 5 #include "chrome/browser/ui/views/collected_cookies_views.h"
6 6
7 #include "chrome/browser/browsing_data_appcache_helper.h" 7 #include "chrome/browser/browsing_data_appcache_helper.h"
8 #include "chrome/browser/browsing_data_cookie_helper.h" 8 #include "chrome/browser/browsing_data_cookie_helper.h"
9 #include "chrome/browser/browsing_data_database_helper.h" 9 #include "chrome/browser/browsing_data_database_helper.h"
10 #include "chrome/browser/browsing_data_file_system_helper.h" 10 #include "chrome/browser/browsing_data_file_system_helper.h"
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 views::View* CollectedCookiesViews::CreateAllowedPane() { 325 views::View* CollectedCookiesViews::CreateAllowedPane() {
326 TabSpecificContentSettings* content_settings = 326 TabSpecificContentSettings* content_settings =
327 tab_contents_->content_settings(); 327 tab_contents_->content_settings();
328 328
329 // Create the controls that go into the pane. 329 // Create the controls that go into the pane.
330 allowed_label_ = new views::Label(l10n_util::GetStringUTF16( 330 allowed_label_ = new views::Label(l10n_util::GetStringUTF16(
331 IDS_COLLECTED_COOKIES_ALLOWED_COOKIES_LABEL)); 331 IDS_COLLECTED_COOKIES_ALLOWED_COOKIES_LABEL));
332 332
333 const LocalSharedObjectsContainer& allowed_lsos = 333 const LocalSharedObjectsContainer& allowed_lsos =
334 content_settings->allowed_local_shared_objects(); 334 content_settings->allowed_local_shared_objects();
335 allowed_cookies_tree_model_.reset( 335 ContainerMap apps_map;
336 new CookiesTreeModel(allowed_lsos.cookies()->Clone(), 336 apps_map[std::string()] = new LocalDataContainer(
337 allowed_lsos.databases()->Clone(), 337 std::string(), std::string(),
338 allowed_lsos.local_storages()->Clone(), 338 allowed_lsos.cookies()->Clone(),
339 allowed_lsos.session_storages()->Clone(), 339 allowed_lsos.databases()->Clone(),
340 allowed_lsos.appcaches()->Clone(), 340 allowed_lsos.local_storages()->Clone(),
341 allowed_lsos.indexed_dbs()->Clone(), 341 allowed_lsos.session_storages()->Clone(),
342 allowed_lsos.file_systems()->Clone(), 342 allowed_lsos.appcaches()->Clone(),
343 NULL, 343 allowed_lsos.indexed_dbs()->Clone(),
344 allowed_lsos.server_bound_certs()->Clone(), 344 allowed_lsos.file_systems()->Clone(),
345 true)); 345 NULL,
346 allowed_lsos.server_bound_certs()->Clone());
347
348 allowed_cookies_tree_model_.reset(new CookiesTreeModel(apps_map, true));
346 allowed_cookies_tree_ = new views::TreeView(); 349 allowed_cookies_tree_ = new views::TreeView();
347 allowed_cookies_tree_->SetModel(allowed_cookies_tree_model_.get()); 350 allowed_cookies_tree_->SetModel(allowed_cookies_tree_model_.get());
348 allowed_cookies_tree_->SetRootShown(false); 351 allowed_cookies_tree_->SetRootShown(false);
349 allowed_cookies_tree_->SetEditable(false); 352 allowed_cookies_tree_->SetEditable(false);
350 allowed_cookies_tree_->set_lines_at_root(true); 353 allowed_cookies_tree_->set_lines_at_root(true);
351 allowed_cookies_tree_->set_auto_expand_children(true); 354 allowed_cookies_tree_->set_auto_expand_children(true);
352 allowed_cookies_tree_->SetController(this); 355 allowed_cookies_tree_->SetController(this);
353 356
354 block_allowed_button_ = new views::NativeTextButton(this, 357 block_allowed_button_ = new views::NativeTextButton(this,
355 l10n_util::GetStringUTF16(IDS_COLLECTED_COOKIES_BLOCK_BUTTON)); 358 l10n_util::GetStringUTF16(IDS_COLLECTED_COOKIES_BLOCK_BUTTON));
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 // Create the controls that go into the pane. 396 // Create the controls that go into the pane.
394 blocked_label_ = new views::Label( 397 blocked_label_ = new views::Label(
395 l10n_util::GetStringUTF16( 398 l10n_util::GetStringUTF16(
396 prefs->GetBoolean(prefs::kBlockThirdPartyCookies) ? 399 prefs->GetBoolean(prefs::kBlockThirdPartyCookies) ?
397 IDS_COLLECTED_COOKIES_BLOCKED_THIRD_PARTY_BLOCKING_ENABLED : 400 IDS_COLLECTED_COOKIES_BLOCKED_THIRD_PARTY_BLOCKING_ENABLED :
398 IDS_COLLECTED_COOKIES_BLOCKED_COOKIES_LABEL)); 401 IDS_COLLECTED_COOKIES_BLOCKED_COOKIES_LABEL));
399 blocked_label_->SetMultiLine(true); 402 blocked_label_->SetMultiLine(true);
400 blocked_label_->SetHorizontalAlignment(views::Label::ALIGN_LEFT); 403 blocked_label_->SetHorizontalAlignment(views::Label::ALIGN_LEFT);
401 const LocalSharedObjectsContainer& blocked_lsos = 404 const LocalSharedObjectsContainer& blocked_lsos =
402 content_settings->blocked_local_shared_objects(); 405 content_settings->blocked_local_shared_objects();
403 blocked_cookies_tree_model_.reset( 406 string16 name = ASCIIToUTF16("Site Data");
404 new CookiesTreeModel(blocked_lsos.cookies()->Clone(), 407 ContainerMap apps_map;
405 blocked_lsos.databases()->Clone(), 408 apps_map[std::string()] = new LocalDataContainer(
406 blocked_lsos.local_storages()->Clone(), 409 std::string(), std::string(),
407 blocked_lsos.session_storages()->Clone(), 410 blocked_lsos.cookies()->Clone(),
408 blocked_lsos.appcaches()->Clone(), 411 blocked_lsos.databases()->Clone(),
409 blocked_lsos.indexed_dbs()->Clone(), 412 blocked_lsos.local_storages()->Clone(),
410 blocked_lsos.file_systems()->Clone(), 413 blocked_lsos.session_storages()->Clone(),
411 NULL, 414 blocked_lsos.appcaches()->Clone(),
412 blocked_lsos.server_bound_certs()->Clone(), 415 blocked_lsos.indexed_dbs()->Clone(),
413 true)); 416 blocked_lsos.file_systems()->Clone(),
417 NULL,
418 blocked_lsos.server_bound_certs()->Clone());
419
420 blocked_cookies_tree_model_.reset(new CookiesTreeModel(apps_map, true));
414 blocked_cookies_tree_ = new views::TreeView(); 421 blocked_cookies_tree_ = new views::TreeView();
415 blocked_cookies_tree_->SetModel(blocked_cookies_tree_model_.get()); 422 blocked_cookies_tree_->SetModel(blocked_cookies_tree_model_.get());
416 blocked_cookies_tree_->SetRootShown(false); 423 blocked_cookies_tree_->SetRootShown(false);
417 blocked_cookies_tree_->SetEditable(false); 424 blocked_cookies_tree_->SetEditable(false);
418 blocked_cookies_tree_->set_lines_at_root(true); 425 blocked_cookies_tree_->set_lines_at_root(true);
419 blocked_cookies_tree_->set_auto_expand_children(true); 426 blocked_cookies_tree_->set_auto_expand_children(true);
420 blocked_cookies_tree_->SetController(this); 427 blocked_cookies_tree_->SetController(this);
421 428
422 allow_blocked_button_ = new views::NativeTextButton(this, 429 allow_blocked_button_ = new views::NativeTextButton(this,
423 l10n_util::GetStringUTF16(IDS_COLLECTED_COOKIES_ALLOW_BUTTON)); 430 l10n_util::GetStringUTF16(IDS_COLLECTED_COOKIES_ALLOW_BUTTON));
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
524 /////////////////////////////////////////////////////////////////////////////// 531 ///////////////////////////////////////////////////////////////////////////////
525 // CollectedCookiesViews, content::NotificationObserver implementation: 532 // CollectedCookiesViews, content::NotificationObserver implementation:
526 533
527 void CollectedCookiesViews::Observe( 534 void CollectedCookiesViews::Observe(
528 int type, 535 int type,
529 const content::NotificationSource& source, 536 const content::NotificationSource& source,
530 const content::NotificationDetails& details) { 537 const content::NotificationDetails& details) {
531 DCHECK(type == chrome::NOTIFICATION_COLLECTED_COOKIES_SHOWN); 538 DCHECK(type == chrome::NOTIFICATION_COLLECTED_COOKIES_SHOWN);
532 window_->CloseConstrainedWindow(); 539 window_->CloseConstrainedWindow();
533 } 540 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/collected_cookies_gtk.cc ('k') | chrome/browser/ui/webui/cookies_tree_model_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698