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

Side by Side Diff: chrome/browser/content_settings/tab_specific_content_settings.cc

Issue 9473001: Extract minimal RenderViewHost interface for embedders, leaving (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to LKGR. Created 8 years, 9 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/content_settings/tab_specific_content_settings.h" 5 #include "chrome/browser/content_settings/tab_specific_content_settings.h"
6 6
7 #include <list> 7 #include <list>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 79 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
80 RenderViewHost* view = RenderViewHost::FromID( 80 RenderViewHost* view = RenderViewHost::FromID(
81 render_process_id, render_view_id); 81 render_process_id, render_view_id);
82 if (!view) 82 if (!view)
83 return NULL; 83 return NULL;
84 // We loop through the tab contents and compare them with |view|, instead of 84 // We loop through the tab contents and compare them with |view|, instead of
85 // getting the RVH from each tab contents and comparing its IDs because the 85 // getting the RVH from each tab contents and comparing its IDs because the
86 // latter will miss provisional RenderViewHosts. 86 // latter will miss provisional RenderViewHosts.
87 for (TabSpecificList::iterator i = g_tab_specific.Get().begin(); 87 for (TabSpecificList::iterator i = g_tab_specific.Get().begin();
88 i != g_tab_specific.Get().end(); ++i) { 88 i != g_tab_specific.Get().end(); ++i) {
89 if (view->delegate()->GetAsWebContents() == (*i)->web_contents()) 89 if (view->GetDelegate()->GetAsWebContents() == (*i)->web_contents())
90 return (*i); 90 return (*i);
91 } 91 }
92 92
93 return NULL; 93 return NULL;
94 } 94 }
95 95
96 // static 96 // static
97 void TabSpecificContentSettings::CookiesRead(int render_process_id, 97 void TabSpecificContentSettings::CookiesRead(int render_process_id,
98 int render_view_id, 98 int render_view_id,
99 const GURL& url, 99 const GURL& url,
(...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after
518 return new CookiesTreeModel(cookies_->Clone(), 518 return new CookiesTreeModel(cookies_->Clone(),
519 databases_->Clone(), 519 databases_->Clone(),
520 local_storages_->Clone(), 520 local_storages_->Clone(),
521 session_storages_->Clone(), 521 session_storages_->Clone(),
522 appcaches_->Clone(), 522 appcaches_->Clone(),
523 indexed_dbs_->Clone(), 523 indexed_dbs_->Clone(),
524 file_systems_->Clone(), 524 file_systems_->Clone(),
525 NULL, 525 NULL,
526 true); 526 true);
527 } 527 }
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/notifications/balloon_view.cc ('k') | chrome/browser/debugger/devtools_sanity_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698