# eric6.Helpviewer.Bookmarks.BookmarksImporters.ChromeImporter

Module implementing an importer for Chrome bookmarks.

### Global Attributes

None

### Classes

ChromeImporter | Class implementing the Chrome bookmarks importer.

### Functions

getImporterInfo | Module function to get information for the given source id.

## ChromeImporter

Class implementing the Chrome bookmarks importer.

### Derived from

BookmarksImporter

### Class Attributes

None

### Class Methods

None

### Methods

ChromeImporter | Constructor
__generateFolderNode | Private method to process a bookmarks folder.
__generateUrlNode | Private method to process a bookmarks node.
__processRoots | Private method to process the bookmark roots.
importedBookmarks | Public method to get the imported bookmarks.
open | Public method to open the bookmarks file.
setPath | Public method to set the path of the bookmarks file or directory.

### Static Methods

None

#### ChromeImporter (Constructor)

ChromeImporter(sourceId="", parent=None)

Constructor

sourceId
  source ID (string)
parent
  reference to the parent object (QObject)

#### ChromeImporter.__generateFolderNode

__generateFolderNode(data, rootNode)

Private method to process a bookmarks folder.

data
  dictionary with the bookmarks data (dict)
rootNode
  node to add the bookmarks to (BookmarkNode)

#### ChromeImporter.__generateUrlNode

__generateUrlNode(data, rootNode)

Private method to process a bookmarks node.

data
  dictionary with the bookmarks data (dict)
rootNode
  node to add the bookmarks to (BookmarkNode)

#### ChromeImporter.__processRoots

__processRoots(data, rootNode)

Private method to process the bookmark roots.

data
  dictionary with the bookmarks data (dict)
rootNode
  node to add the bookmarks to (BookmarkNode)

#### ChromeImporter.importedBookmarks

importedBookmarks()

Public method to get the imported bookmarks.

Returns:
  imported bookmarks (BookmarkNode)

#### ChromeImporter.open

open()

Public method to open the bookmarks file.

Returns:
  flag indicating success (boolean)

#### ChromeImporter.setPath

setPath(path)

Public method to set the path of the bookmarks file or directory.

path
  bookmarks file or directory (string)

Up

## getImporterInfo

getImporterInfo(sourceId)

Module function to get information for the given source id.

sourceId
  id of the browser ("chrome" or "chromium")

Returns:
  tuple with an icon (QPixmap), readable name (string), name of the default bookmarks file (string), an info text (string), a prompt (string) and the default directory of the bookmarks file (string)

Raises ValueError:
  raised to indicate an invalid browser ID

Up