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

Side by Side Diff: chrome/browser/ui/views/frame/browser_view_unittest.cc

Issue 15517005: Remove references to Profile from browser_context_keyed_service. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase & style Created 7 years, 7 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "chrome/browser/ui/views/frame/browser_view.h" 5 #include "chrome/browser/ui/views/frame/browser_view.h"
6 6
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 8
9 #include "chrome/app/chrome_command_ids.h" 9 #include "chrome/app/chrome_command_ids.h"
10 #include "chrome/browser/autocomplete/autocomplete_classifier.h" 10 #include "chrome/browser/autocomplete/autocomplete_classifier.h"
(...skipping 30 matching lines...) Expand all
41 gfx::Rect tabstrip_bounds( 41 gfx::Rect tabstrip_bounds(
42 browser_view->frame()->GetBoundsForTabStrip(browser_view->tabstrip())); 42 browser_view->frame()->GetBoundsForTabStrip(browser_view->tabstrip()));
43 gfx::Point tabstrip_origin(tabstrip_bounds.origin()); 43 gfx::Point tabstrip_origin(tabstrip_bounds.origin());
44 views::View::ConvertPointToTarget(browser_view->parent(), 44 views::View::ConvertPointToTarget(browser_view->parent(),
45 browser_view, 45 browser_view,
46 &tabstrip_origin); 46 &tabstrip_origin);
47 return tabstrip_origin; 47 return tabstrip_origin;
48 } 48 }
49 49
50 // Caller owns the returned service. 50 // Caller owns the returned service.
51 ProfileKeyedService* CreateTemplateURLService( 51 BrowserContextKeyedService* CreateTemplateURLService(
52 content::BrowserContext* profile) { 52 content::BrowserContext* profile) {
53 return new TemplateURLService(static_cast<Profile*>(profile)); 53 return new TemplateURLService(static_cast<Profile*>(profile));
54 } 54 }
55 55
56 ProfileKeyedService* CreateAutocompleteClassifier( 56 BrowserContextKeyedService* CreateAutocompleteClassifier(
57 content::BrowserContext* profile) { 57 content::BrowserContext* profile) {
58 return new AutocompleteClassifier(static_cast<Profile*>(profile)); 58 return new AutocompleteClassifier(static_cast<Profile*>(profile));
59 } 59 }
60 60
61 } // namespace 61 } // namespace
62 62
63 class BrowserViewTest : public BrowserWithTestWindowTest { 63 class BrowserViewTest : public BrowserWithTestWindowTest {
64 public: 64 public:
65 BrowserViewTest(); 65 BrowserViewTest();
66 virtual ~BrowserViewTest() {} 66 virtual ~BrowserViewTest() {}
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 string16()); 245 string16());
246 EXPECT_FALSE(bookmark_bar->visible()); 246 EXPECT_FALSE(bookmark_bar->visible());
247 EXPECT_FALSE(bookmark_bar->IsDetached()); 247 EXPECT_FALSE(bookmark_bar->IsDetached());
248 EXPECT_EQ(top_container, bookmark_bar->parent()); 248 EXPECT_EQ(top_container, bookmark_bar->parent());
249 // Top container is still second from front. 249 // Top container is still second from front.
250 EXPECT_EQ(browser_view()->child_count() - 2, 250 EXPECT_EQ(browser_view()->child_count() - 2,
251 browser_view()->GetIndexOf(top_container)); 251 browser_view()->GetIndexOf(top_container));
252 252
253 BookmarkBarView::DisableAnimationsForTesting(false); 253 BookmarkBarView::DisableAnimationsForTesting(false);
254 } 254 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698