Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(484)

Side by Side Diff: chrome/browser/ui/omnibox/omnibox_view_browsertest.cc

Issue 10831062: Removing instances of profile_->GetBookmarkModel() as part of converting BookmarkModel to a PKS. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <stdio.h> 5 #include <stdio.h>
6 6
7 #include "base/message_loop.h" 7 #include "base/message_loop.h"
8 #include "base/string16.h" 8 #include "base/string16.h"
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "base/time.h" 10 #include "base/time.h"
11 #include "base/utf_string_conversions.h" 11 #include "base/utf_string_conversions.h"
12 #include "chrome/app/chrome_command_ids.h" 12 #include "chrome/app/chrome_command_ids.h"
13 #include "chrome/browser/autocomplete/autocomplete_match.h" 13 #include "chrome/browser/autocomplete/autocomplete_match.h"
14 #include "chrome/browser/autocomplete/history_quick_provider.h" 14 #include "chrome/browser/autocomplete/history_quick_provider.h"
15 #include "chrome/browser/bookmarks/bookmark_model.h" 15 #include "chrome/browser/bookmarks/bookmark_model.h"
16 #include "chrome/browser/bookmarks/bookmark_model_factory.h"
16 #include "chrome/browser/bookmarks/bookmark_utils.h" 17 #include "chrome/browser/bookmarks/bookmark_utils.h"
17 #include "chrome/browser/history/history.h" 18 #include "chrome/browser/history/history.h"
18 #include "chrome/browser/history/history_service_factory.h" 19 #include "chrome/browser/history/history_service_factory.h"
19 #include "chrome/browser/profiles/profile.h" 20 #include "chrome/browser/profiles/profile.h"
20 #include "chrome/browser/search_engines/template_url.h" 21 #include "chrome/browser/search_engines/template_url.h"
21 #include "chrome/browser/search_engines/template_url_service.h" 22 #include "chrome/browser/search_engines/template_url_service.h"
22 #include "chrome/browser/search_engines/template_url_service_factory.h" 23 #include "chrome/browser/search_engines/template_url_service_factory.h"
23 #include "chrome/browser/ui/browser.h" 24 #include "chrome/browser/ui/browser.h"
24 #include "chrome/browser/ui/browser_commands.h" 25 #include "chrome/browser/ui/browser_commands.h"
25 #include "chrome/browser/ui/browser_tabstrip.h" 26 #include "chrome/browser/ui/browser_tabstrip.h"
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 profile, Profile::EXPLICIT_ACCESS); 304 profile, Profile::EXPLICIT_ACCESS);
304 ASSERT_TRUE(history_service); 305 ASSERT_TRUE(history_service);
305 306
306 if (!history_service->BackendLoaded()) { 307 if (!history_service->BackendLoaded()) {
307 content::NotificationRegistrar registrar; 308 content::NotificationRegistrar registrar;
308 registrar.Add(this, chrome::NOTIFICATION_HISTORY_LOADED, 309 registrar.Add(this, chrome::NOTIFICATION_HISTORY_LOADED,
309 content::Source<Profile>(profile)); 310 content::Source<Profile>(profile));
310 content::RunMessageLoop(); 311 content::RunMessageLoop();
311 } 312 }
312 313
313 BookmarkModel* bookmark_model = profile->GetBookmarkModel(); 314 BookmarkModel* bookmark_model =
315 BookmarkModelFactory::GetForProfile(profile);
314 ASSERT_TRUE(bookmark_model); 316 ASSERT_TRUE(bookmark_model);
315 317
316 if (!bookmark_model->IsLoaded()) { 318 if (!bookmark_model->IsLoaded()) {
317 content::NotificationRegistrar registrar; 319 content::NotificationRegistrar registrar;
318 registrar.Add(this, chrome::NOTIFICATION_BOOKMARK_MODEL_LOADED, 320 registrar.Add(this, chrome::NOTIFICATION_BOOKMARK_MODEL_LOADED,
319 content::Source<Profile>(profile)); 321 content::Source<Profile>(profile));
320 content::RunMessageLoop(); 322 content::RunMessageLoop();
321 } 323 }
322 324
323 GURL url(entry.url); 325 GURL url(entry.url);
(...skipping 1345 matching lines...) Expand 10 before | Expand all | Expand 10 after
1669 1671
1670 // Middle-clicking shouldn't select all the text either. 1672 // Middle-clicking shouldn't select all the text either.
1671 ASSERT_NO_FATAL_FAILURE( 1673 ASSERT_NO_FATAL_FAILURE(
1672 ClickFocusViewOrigin(ui_controls::LEFT, kClickOffset, kClickOffset)); 1674 ClickFocusViewOrigin(ui_controls::LEFT, kClickOffset, kClickOffset));
1673 ASSERT_NO_FATAL_FAILURE(ClickBrowserWindowCenter()); 1675 ASSERT_NO_FATAL_FAILURE(ClickBrowserWindowCenter());
1674 ASSERT_NO_FATAL_FAILURE( 1676 ASSERT_NO_FATAL_FAILURE(
1675 ClickFocusViewOrigin(ui_controls::MIDDLE, kClickOffset, kClickOffset)); 1677 ClickFocusViewOrigin(ui_controls::MIDDLE, kClickOffset, kClickOffset));
1676 EXPECT_FALSE(omnibox_view->IsSelectAll()); 1678 EXPECT_FALSE(omnibox_view->IsSelectAll());
1677 } 1679 }
1678 #endif // defined(USE_AURA) 1680 #endif // defined(USE_AURA)
OLDNEW
« chrome/browser/ui/browser_commands.cc ('K') | « chrome/browser/ui/browser_commands.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698