diff options
author | mirandac@chromium.org <mirandac@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-14 00:21:41 +0000 |
---|---|---|
committer | mirandac@chromium.org <mirandac@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-14 00:21:41 +0000 |
commit | fa6797241c533cc2c2ce0504f68decdea990c59f (patch) | |
tree | c6d7277e574252dc12c63d0a4c822a86795fb574 | |
parent | a08bfa6f5b6115a910060405ec8e88db8f8e539e (diff) | |
download | chromium_src-fa6797241c533cc2c2ce0504f68decdea990c59f.zip chromium_src-fa6797241c533cc2c2ce0504f68decdea990c59f.tar.gz chromium_src-fa6797241c533cc2c2ce0504f68decdea990c59f.tar.bz2 |
Add a constructor to initialize a URLRow with a URLID. This is needed when passing a URLRow across IPC for out of process import.
BUG=18774
TEST=NONE
Review URL: http://codereview.chromium.org/2127002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47226 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/history/history_types.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/chrome/browser/history/history_types.h b/chrome/browser/history/history_types.h index a2be051..09d4e5e 100644 --- a/chrome/browser/history/history_types.h +++ b/chrome/browser/history/history_types.h @@ -58,10 +58,21 @@ class URLRow { URLRow() { Initialize(); } + explicit URLRow(const GURL& url) : url_(url) { // Initialize will not set the URL, so our initialization above will stay. Initialize(); } + + // We need to be able to set the id of a URLRow that's being passed through + // an IPC message. This constructor should probably not be used otherwise. + URLRow(const GURL& url, URLID id) : url_(url) { + // Initialize will not set the URL, so our initialization above will stay. + Initialize(); + // Initialize will zero the id_, so set it here. + id_ = id; + } + virtual ~URLRow() {} URLID id() const { return id_; } |