<PAGE>
                                                                   Exhibit 10.15

                                 XENOPORT, INC.

                           CHANGE OF CONTROL AGREEMENT

      This Change of Control Agreement (the "AGREEMENT") is made and entered
into by and between William J. Rieflin (the "EXECUTIVE") and XenoPort, Inc. a
Delaware corporation (the "COMPANY"), effective as of June 18, 2004.

                                    RECITALS

      It is expected that the Company from time to time may consider the
possibility of an acquisition by another company or other change of control. The
Board of Directors of the Company (the "BOARD") recognizes that such
consideration can be a distraction to the Executive and can cause the Executive
to consider alternative employment opportunities. The Board has determined that
it is in the best interests of the Company and its stockholders to assure that
the Company will have the continued dedication and objectivity of the Executive,
notwithstanding the possibility, threat or occurrence of a Change of Control (as
defined below) of the Company.

      The Board believes that it is in the best interests of the Company and its
stockholders to provide the Executive with an incentive to continue his
employment and to motivate the Executive to maximize the value of the Company
upon a Change of Control for the benefit of its stockholders.

      Certain capitalized terms used in the Agreement are defined in Section 5
below.

      The parties hereto agree as follows:

1. TERM OF AGREEMENT. This Agreement shall terminate upon the date that all
obligations of the parties hereto with respect to this Agreement have been
satisfied.

2. AT-WILL EMPLOYMENT. The Company and the Executive acknowledge that the
Executive's employment is and shall continue to be at-will. If the Executive's
employment terminates for any reason, including (without limitation) any
termination prior to a Change of Control, the Executive shall not be entitled to
any payments, benefits, damages, awards or compensation other than as provided
by this Agreement, or as may otherwise be available in accordance with the
Company's established written Executive plans or pursuant to other written
agreements with the Company.

3. TERMINATION FOLLOWING A CHANGE OF CONTROL.

      (a) TERMINATION WITHOUT CAUSE OR VOLUNTARY TERMINATION FOR GOOD REASON. In
the event that a Change of Control (as defined below) of the Company occurs, and
during the period beginning on the closing date of the transaction giving rise
to such Change of Control and ending twelve (12) months after such closing date,
the Executive's employment with the Company (or the successor entity in such
Change of Control transaction) is either (1) terminated by the Company (or its
successor entity) without Cause (as defined below) or (2) terminated by the
Executive for Good Reason (as defined below), then the Executive shall be
entitled to receive Termination Benefits (as defined below).

                                       1.
<PAGE>

      (b) CONSTRUCTIVE TERMINATION. In the event that a Change of Control (as
defined below) of the Company occurs, and during the period beginning on the
closing date of the transaction giving rise to such Change of Control and ending
twelve (12) months after such closing date, the Executive's employment with the
Company (or the successor entity in such Change of Control transaction) is
Constructively Terminated (as defined below) by [he Executive, then the
Executive shall be entitled to receive Termination Benefits (as defined below).
Notwithstanding the foregoing, the Executive shall not be entitled to the
Termination Benefits solely by reason of this Section 3(b) if the Executive
resigns his employment prior to the date six (6) months after the closing of the
transaction giving rise to such Change of Control.

4. CERTAIN ADDITIONAL PAYMENTS BY THE COMPANY.

      (a) In the event that it shall be determined (as hereafter provided) that
any payment or distribution by the Company or any of its affiliates to or for
the benefit of the Executive, whether paid or payable or distributed or
distributable pursuant to the terms of this Agreement or otherwise pursuant to
or by reason of any other agreement, policy, plan, program or arrangement,
including without limitation any stock option, stock appreciation right or
similar right, or the lapse or termination of any restriction on or the vesting
or exercisability of any of the foregoing (a "PAYMENT"), would be subject to the
excise tax imposed by Section 4999 of the Internal Revenue Code of 1986, as
amended (the "CODE") (or any successor provision thereto) by reason of being
considered "contingent on a change in ownership or control" of the Company,
within the meaning of Section 280G of the Code (or any successor provision
thereto) or to any similar tax imposed by state or local law, or any interest or
penalties with respect to such tax (such tax or taxes, together with any such
interest and penalties, being hereafter collectively referred to as the "EXCISE
TAX"), then the Executive shall be entitled to receive an additional payment or
payments (collectively, a "GROSS-UP PAYMENT"); provided, however, that no
Gross-Up Payment shall be made with respect to the Excise Tax, if any,
attributable to (i) any incentive stock option, as defined by Section 422 of the
Code ("ISO") granted prior to the execution of this Agreement, (ii) any stock
appreciation or similar right, whether or not limited, granted in tandem with
any IS0 described in clause (i), or (iii) any stock, stock option, stock
appreciation or similar right, or other Stock Right OTHER THAN those acquired by
the Executive at the time of Executive's commencement of employment with the
Company. The Gross-Up Payment shall be in an amount such that, after payment by
the Executive of all taxes (including any interest or penalties imposed with
respect to such [axes), including any Excise Tax imposed upon the Gross-Up
Payment, the Executive retains an amount of the Gross-Up Payment equal to the
Excise Tax imposed upon the Payment. Notwithstanding anything to the contrary
set forth in this Agreement, in no event shall the aggregate Gross-Up Payment
payable by the Company hereunder exceed $1,500,000.

      (b) Subject to the provisions of Section 4(b), all determinations required
to be made under this Section 4, including whether an Excise Tax is payable by
the Executive and the amount of such Excise Tax and whether a Gross-Up Payment
is required to be paid by the Company to the Executive and the amount of such
Gross-Up Payment, if any, shall be made by a nationally recognized accounting
firm (the "ACCOUNTING FIRM") selected by the Company with the consent of the
Executive, which shall not unreasonably be withheld. The Executive shall direct
the Accounting Firm to submit its determination and detailed supporting
calculations to both the Company and the Executive within 30 calendar days after
the Termination Date, if

                                       2.
<PAGE>

applicable, and any such other time or times as may be requested by the Company
or the Executive. If the Accounting Firm determines that any Excise Tax is
payable by the Executive, the Company shall pay the required Gross-Up Payment to
the Executive within five business days after receipt of such determination and
calculations with respect to any Payment to the Executive. If the Accounting
Firm determines that no Excise Tax is payable by the Executive, it shall, at the
same time as it makes such determination, furnish the Company and the Executive
an opinion that the Executive has substantial authority not to report any Excise
Tax on his federal, state or local income or other tax return. As a result of
the uncertainty in the application of Section 4999 of the Code (or any successor
provision thereto) and the possibility of similar uncertainty regarding
applicable state or local tax law at the time of any determination by the
Accounting Firm hereunder, it is possible that Gross-Up Payments which will not
have been made by the Company should have been made (an "UNDERPAYMENT"),
consistent with the calculations required to be made hereunder. In the event
that the Company exhausts or fails to pursue its remedies pursuant to Section
4(f) and the Executive thereafter is required to make a payment of any Excise
Tax, the Executive shall direct the Accounting Firm to determine the amount of
the Underpayment that has occurred and to submit its determination and detailed
supporting calculations to both the Company and the Executive as promptly as
possible. Any such Underpayment shall be promptly paid by the Company to, or for
the benefit of, the Executive within five business days after receipt of such
determination and calculations.

      (c) The Company and the Executive shall each provide the Accounting Firm
access to and copies of any books, records and documents in the possession of
the Company or the Executive, as the case may be, reasonably requested by the
Accounting Firm, and otherwise cooperate with the Accounting Firm in connection
with the preparation and issuance of the determinations and calculations
contemplated by Section 4(b). Any determination by the Accounting Firm as to the
amount of the Gross-Up Payment shall be binding upon the Company and the
Executive.

      (d) The federal, state and local income or other tax returns filed by the
Executive shall be prepared and filed on a consistent basis with the
determination of the Accounting Firm with respect to the Excise Tax payable by
the Executive. The Executive shall make proper payment of the amount of any
Excise Payment, and at the request of the Company, provide to the Company true
and correct copies (with any amendments) of his federal income tax return as
filed with the Internal Revenue Service and corresponding state and local tax
returns, if relevant, as filed with the applicable taxing authority, and such
other documents reasonably requested by the Company, evidencing such payment. If
prior to the filing of the Executive's federal income tax return, or
corresponding state or local tax return, if relevant, the Accounting Firm
determines that the amount of the Gross-Up Payment should be reduced, the
Executive shall within five business days pay to the Company the amount of such
reduction.

      (e) The fees and expenses of the Accounting Firm for its services in
connection with the determinations and calculations contemplated by Section 4(b)
shall be borne by the Company. If such fees and expenses are initially paid by
the Executive, the Company shall reimburse the Executive the full amount of such
fees and expenses within five business days after receipt from the Executive of
a statement therefore and reasonable evidence of his payment thereof.

                                       3.
<PAGE>

      (f) The Executive shall notify the Company in writing of any claim by the
Internal Revenue Service or any other taxing authority that, if successful,
would require the payment by the Company of a Gross-Up Payment. Such
notification shall be given as promptly as practicable but no later than 10
business days after the Executive actually receives notice of such claim and the
Executive shall further apprise the Company of the nature of such claim and the
date on which such claim is requested to be paid (in each case, to the extent
known by the Executive). The Executive shall not pay such claim prior to the
earlier of (i) the expiration of the 30-calendar-day period following the date
on which he gives such notice to the Company and (ii) the date that any payment
of amount with respect to such claim is due. If the Company notifies the
Executive in writing prior to the expiration of such period that it desires to
contest such claim, the Executive shall:

            (i) provide the Company with any written records or documents in his
possession relating to such claim reasonably requested by the Company;

            (ii) take such action in connection with contesting such claim as
the Company shall reasonably request in writing from time to time, including
without limitation accepting legal representation with respect to such claim by
an attorney competent in respect of the subject matter and reasonably selected
by the Company;

            (iii) cooperate with the Company in good faith in order effectively
to contest such claim; and

            (iv) permit the Company to participate in any proceedings relating
to such claim;

provided, however, that the Company shall bear and pay directly all costs and
expenses (including interest and penalties) incurred in connection with such
contest and shall indemnify and hold harmless the Executive, on an after-tax
basis, for and against any Excise Tax or income tax, including interest and
penalties with respect thereto, imposed as a result of such representation and
payment of costs and expenses. Without limiting the foregoing provisions of this
Section 4(f), the Company shall control all proceedings taken in connection with
the contest of any claim contemplated by this Section 4(f) and, at its sole
option, may pursue or forego any and all administrative appeals, proceedings,
hearings and conferences with the taxing authority in respect of such claim
(provided, however, that the Executive may participate therein at his own cost
and expense) and may, at its option, either direct the Executive to pay the tax
claimed and sue for a refund or contest the claim in any permissible manner,
arid the Executive agrees to prosecute such contest to a determination before
any administrative tribunal, in a court of initial jurisdiction and in one or
more appellate courts, as the Company shall determine; provided, however, that
if the Company directs the Executive to pay the tax claimed and sue for a
refund, the Company shall advance the amount of such payment to the Executive on
an interest-free basis and shall indemnify and hold the Executive harmless, on
an after-tax basis, from any Excise Tax or income or other tax, including
interest or penalties with respect thereto, imposed with respect to such
advance; and provided further, however, that any extension of the statute of
limitations relating to payment of taxes for the taxable year of the Executive
with respect to which the contested amount is claimed to be due is limited
solely to such contested amount. Furthermore, the Company's control of any such
contested claim shall be limited to issues with

                                       4.
<PAGE>

respect to which a Gross-Up Payment would be payable hereunder and the Executive
shall be entitled to settle or contest, as the case may be, any other issue
raised by the Internal Revenue Service or any other taxing authority.

      (g) If, after the receipt by the Executive of an amount advanced by the
Company pursuant to Section 4(f), the Executive receives any refund with respect
to such claim, the Executive shall (subject to the Company's complying with the
requirements of Section 4(f)) promptly pay to the Company the amount of such
refund (together with any interest paid or credited thereon after any taxes
applicable thereto). If, after the receipt by the Executive of an amount
advanced by the Company pursuant to Section 4(f), a determination is made that
the Executive shall not be entitled to any refund with respect to such claim and
the Company does not notify the Executive in writing of its intent to contest
such denial or refund prior to the expiration of 30 calendar days after such
determination, then such advance shall be forgiven and shall not be required to
be repaid and the amount of any such advance shall offset, to the extent
thereof, the amount of Gross-Up Payment required to be paid by the Company to
the Executive pursuant to this Section 4.

5. DEFINITION OF TERMS. The following terms referred to in this Agreement shall
have the following meanings:

      "CAUSE" shall mean either (i) any act of personal dishonesty taken by the
Executive in connection with his responsibilities as an Executive and intended
to result in substantial personal enrichment of the Executive, (ii) the
conviction of a felony, (iii) a willful act by the Executive which constitutes
gross misconduct and which is injurious to the Company, or (iv) following
delivery to the Executive of a written demand for performance from the Company
which describes the basis for the Company's belief that the Executive has not
substantially performed his duties, continued violations by the Executive of the
Executive's obligations to the Company which are demonstrably willful and
deliberate on the Executive's part.

      "CHANGE OF CONTROL" means the completion by the Company of a
reorganization, merger, consolidation, in each case with respect to which
persons who were the stockholders of the Company immediately prior to such
reorganization, merger or consolidation would not immediately thereafter own
more than 50% of, respectively, the capital stock and the combined voting power
entitled to vote generally in the election of directors of the reorganized,
merged or consolidated corporation's then-outstanding voting securities, or of a
liquidation or dissolution of the Company or of the sale of all or substantially
all of the assets of the Company. For purposes hereof, such Change of Control
shall be deemed to have occurred on the date on which the transaction closes.

      "CONSTRUCTIVE TERMINATION" shall mean the resignation by the Executive
from employment following, without the Executive's express written consent, the
then continuing assignment to the Executive of material duties or the then
continuing material reduction of the Executive's duties, either of which results
in a significant diminution in the Executive's position or responsibilities in
effect immediately prior to the closing date of the transaction giving rise to a
Change of Control, or the then continuing removal of the Executive from such
position and responsibilities.

                                       5.
<PAGE>

      "GOOD REASON" shall mean (i) a material reduction by the Company in the
cash compensation of the Executive as in effect immediately prior to such
reduction; (ii) a material reduction by the Company in the kind or level of
employee benefits to which the Executive is entitled immediately prior to such
reduction with the result that the Executive's overall benefits package is
significantly reduced; or (iii) without the Executive's express written consent,
the relocation of Executive's principal place of employment to a facility or a
location more than 30 miles from the Executive's then present location.

      "STOCK RIGHTS" shall mean all of the Executive's options or rights to
acquire vested ownership of shares of Common Stock of the Company under plans,
agreements or arrangements which are compensatory in nature, including, without
limitation, the Company's 1999 Stock Plan and Restricted Stock Purchase
Agreements between the Company and the Executive.

      "TERMINATION BENEFITS" shall mean (1) all unvested Stock Rights (as
defined above) shall become fully vested as of the effective date of such
termination of employment described in Section 3(a) or Section 3(b), as the case
may be, and (2) the Executive shall continue to receive for a period of twelve
(12) months following the effective date of such termination of employment
described in Section 3(a) or Section 3(b), as the case may be, continued payment
of the greater of the Executive's base salary in effect immediately prior to (i)
such termination or (ii) the closing date of the transaction giving rise to a
Change of Control. In addition, the Executive shall have the right to convert
his health insurance benefits to individual coverage pursuant to COBRA. Should
the Executive so elect, the Company shall reimburse the Executive for twelve
(12) months of health care coverage.

6. SUCCESSORS.

      (a) COMPANY'S SUCCESSORS. Any successor to the Company (whether direct or
indirect and whether by purchase, merger, consolidation, liquidation or
otherwise) to all or substantially all of the Company's business and/or assets
shall assume the obligations under this Agreement and agree expressly to perform
the obligations under this Agreement in the same manner and to the same extent
as the Company would be required to perform such obligations in the absence of a
succession. For all purposes under this Agreement, the term "Company" shall
include any successor to the Company's business and/or assets which executes and
delivers the assumption agreement described in this Section 6(a) or which
becomes bound by the terms of this Agreement by operation of law.

      (b) EXECUTIVE'S SUCCESSORS. The terms of this Agreement and all rights of
the Executive hereunder shall inure to the benefit of, and be enforceable by,
the Executive's personal or legal representatives, executors, administrators,
successors, heirs, distributees, devisees and legatees.

7. NOTICE.

      (a) GENERAL. Notices and all other communications contemplated by this
Agreement shall be in writing and shall be deemed to have been duly given when
personally delivered or when mailed by U.S. registered or certified mail, return
receipt requested and postage prepaid. In the case of the Executive, mailed
notices shall be addressed to the Executive

                                       6.
<PAGE>

at his or her home address most recently communicated to the Company in writing.
In the case of the Company, mailed notices shall be addressed to its corporate
headquarters, and all notices shall be directed to the attention of its
Secretary.

      (b) NOTICE OF TERMINATION. Any termination by the Company for Cause or by
the Executive as a result of a voluntary resignation or a Constructive
Termination shall be communicated by a notice of termination to the other party
hereto given in accordance with Section 7(a) of this Agreement. Such notice
shall indicate the specific termination provision in this Agreement relied upon,
shall set forth in reasonable detail the facts and circumstances claimed to
provide a basis for termination under the provision so indicated, and shall
specify the termination date (which shall be not more than 30 days after the
giving of such notice). The failure by the Executive to include in the notice
any fact or circumstance which contributes to a showing of Constructive
Termination shall not waive any right of the Executive hereunder or preclude the
Executive from asserting such fact or circumstance in enforcing Executive's
rights hereunder.

8. MISCELLANEOUS PROVISIONS.

      (a) NO DUTY TO MITIGATE. The Executive shall not be required to mitigate
the amount of any payment contemplated by this Agreement, nor shall any such
payment be reduced by any earnings that the Executive may receive from any other
source.

      (b) WAIVER. No provision of this Agreement shall be modified, waived or
discharged unless the modification, waiver or discharge is agreed to in writing
and signed by the Executive and by an authorized officer of the Company (other
than the Executive). No waiver by either party of any breach of, or of
compliance with, any condition or provision of this Agreement by the other party
shall be considered a waiver of any other condition or provision or of the same
condition or provision at another time.

      (c) WHOLE AGREEMENT. No agreements, representations or understandings
(whether oral or written and whether express or implied) which are not expressly
set forth in this Agreement have been made or entered into by either party with
respect to the subject matter hereof. This Agreement represents the entire
understanding of the parties hereto with respect to the subject matter hereof
and supersedes all prior arrangements and understandings regarding same.

      (d) CHOICE OF LAW. The validity, interpretation, construction and
performance of this Agreement shall be governed by the laws of the State of
California as applied to agreements entered into among California residents to
be performed entirely within California, without regard to conflict of laws
rules.

      (e) SEVERABILITY. The invalidity or unenforceability of any provision or
provisions of this Agreement shall not affect the validity or enforceability of
any other provision hereof, which shall remain in full force and effect.

      (f) COUNTERPARTS. This Agreement may be executed in counterparts, each of
which shall be deemed an original, but all of which together will constitute one
and the same instrument.

                                       7.
<PAGE>


      IN WITNESS WHEREOF, each of the parties has executed this Agreement, in
the case of the Company by its duly authorized officer, as of the day and year
set forth below.

COMPANY:                                XENOPORT, INC.

                                        By: /s/ Ronald W. Barrett
                                        Title: Chief Executive Officer

EXECUTIVE:                              /s/ William J. Rieflin
                                        ----------------------------------------
                                        William J. Rieflin

          SIGNATURE PAGE TO XENOPORT, INC. CHANGE OF CONTROL AGREEMENT