Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / ui / toolbar / origin_chip.h
1 // Copyright 2014 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.
4
5 #ifndef CHROME_BROWSER_UI_TOOLBAR_ORIGIN_CHIP_H_
6 #define CHROME_BROWSER_UI_TOOLBAR_ORIGIN_CHIP_H_
7
8 #include "base/strings/string16.h"
9
10 class GURL;
11 class Profile;
12
13 namespace content {
14 class WebContents;
15 }
16
17 // This class provides functions that are shared across all platforms.
18 class OriginChip {
19  public:
20   // Detects client-side or SB malware/phishing hits. Used to decide whether the
21   // origin chip should indicate that the current page has malware or is a known
22   // phishing page.
23   static bool IsMalware(const GURL& url, content::WebContents* tab);
24
25   // Gets the label to display on the Origin Chip for the specified URL. The
26   // |profile| is needed in case the URL is from an extension.
27   static base::string16 LabelFromURLForProfile(const GURL& provided_url,
28                                                Profile* profile);
29 };
30
31 #endif  // CHROME_BROWSER_UI_TOOLBAR_ORIGIN_CHIP_H_