1 // Copyright (c) 2010 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 #include "chrome/browser/profiles/profile.h" 6 #include "chrome/browser/ui/find_bar/find_bar_state.h" 7 8 // static GetLastPrepopulateText(Profile * p)9string16 FindBarState::GetLastPrepopulateText(Profile* p) { 10 FindBarState* state = p->GetFindBarState(); 11 string16 text = state->last_prepopulate_text(); 12 13 if (text.empty() && p->IsOffTheRecord()) { 14 // Fall back to the original profile. 15 state = p->GetOriginalProfile()->GetFindBarState(); 16 text = state->last_prepopulate_text(); 17 } 18 19 return text; 20 } 21