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

Side by Side Diff: chrome/browser/ui/startup/default_browser_prompt.cc

Issue 812823002: Remove dependency of infobars component on the embedder (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compilation on android/win Created 6 years 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
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 "chrome/browser/ui/startup/default_browser_prompt.h" 5 #include "chrome/browser/ui/startup/default_browser_prompt.h"
6 6
7 #include "base/memory/weak_ptr.h" 7 #include "base/memory/weak_ptr.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "base/prefs/pref_registry_simple.h" 10 #include "base/prefs/pref_registry_simple.h"
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 base::WeakPtrFactory<DefaultBrowserInfoBarDelegate> weak_factory_; 98 base::WeakPtrFactory<DefaultBrowserInfoBarDelegate> weak_factory_;
99 99
100 DISALLOW_COPY_AND_ASSIGN(DefaultBrowserInfoBarDelegate); 100 DISALLOW_COPY_AND_ASSIGN(DefaultBrowserInfoBarDelegate);
101 }; 101 };
102 102
103 // static 103 // static
104 void DefaultBrowserInfoBarDelegate::Create(InfoBarService* infobar_service, 104 void DefaultBrowserInfoBarDelegate::Create(InfoBarService* infobar_service,
105 PrefService* prefs, 105 PrefService* prefs,
106 bool interactive_flow_required) { 106 bool interactive_flow_required) {
107 infobar_service->AddInfoBar(ConfirmInfoBarDelegate::CreateInfoBar( 107 infobar_service->AddInfoBar(ConfirmInfoBarDelegate::CreateInfoBar(
108 infobar_service,
108 scoped_ptr<ConfirmInfoBarDelegate>(new DefaultBrowserInfoBarDelegate( 109 scoped_ptr<ConfirmInfoBarDelegate>(new DefaultBrowserInfoBarDelegate(
109 prefs, interactive_flow_required)))); 110 prefs, interactive_flow_required))));
110 } 111 }
111 112
112 DefaultBrowserInfoBarDelegate::DefaultBrowserInfoBarDelegate( 113 DefaultBrowserInfoBarDelegate::DefaultBrowserInfoBarDelegate(
113 PrefService* prefs, 114 PrefService* prefs,
114 bool interactive_flow_required) 115 bool interactive_flow_required)
115 : ConfirmInfoBarDelegate(), 116 : ConfirmInfoBarDelegate(),
116 prefs_(prefs), 117 prefs_(prefs),
117 action_taken_(false), 118 action_taken_(false),
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 base::Bind(&CheckDefaultBrowserCallback, desktop_type)); 257 base::Bind(&CheckDefaultBrowserCallback, desktop_type));
257 } 258 }
258 259
259 #if !defined(OS_WIN) 260 #if !defined(OS_WIN)
260 bool ShowFirstRunDefaultBrowserPrompt(Profile* profile) { 261 bool ShowFirstRunDefaultBrowserPrompt(Profile* profile) {
261 return false; 262 return false;
262 } 263 }
263 #endif 264 #endif
264 265
265 } // namespace chrome 266 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698