Add new certificateProvider extension API.
[chromium-blink-merge.git] / chrome / browser / ui / tabs / tab_strip_model_utils.cc
blobf599d9642710d3378e3cf23fd1b892b2c221f6bf
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
3 // found in the LICENSE file.
5 #include "chrome/browser/ui/tabs/tab_strip_model_utils.h"
7 #include "chrome/browser/ui/tabs/tab_strip_model.h"
8 #include "components/history/core/browser/top_sites.h"
9 #include "content/public/browser/web_contents.h"
11 namespace chrome {
13 void GetOpenUrls(const TabStripModel& tabs,
14 const history::TopSites& top_sites,
15 std::set<std::string>* urls) {
16 for (int i = 0; i < tabs.count(); ++i) {
17 content::WebContents* web_contents = tabs.GetWebContentsAt(i);
18 if (web_contents)
19 urls->insert(top_sites.GetCanonicalURLString(web_contents->GetURL()));
23 } // namespace chrome