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

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

Issue 1865213004: Convert //chrome/browser/ui from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 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
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 <string> 7 #include <string>
8 8
9 #include "base/location.h" 9 #include "base/location.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 87
88 // Used to delay the expiration of the info-bar. 88 // Used to delay the expiration of the info-bar.
89 base::WeakPtrFactory<DefaultBrowserInfoBarDelegate> weak_factory_; 89 base::WeakPtrFactory<DefaultBrowserInfoBarDelegate> weak_factory_;
90 90
91 DISALLOW_COPY_AND_ASSIGN(DefaultBrowserInfoBarDelegate); 91 DISALLOW_COPY_AND_ASSIGN(DefaultBrowserInfoBarDelegate);
92 }; 92 };
93 93
94 // static 94 // static
95 void DefaultBrowserInfoBarDelegate::Create(InfoBarService* infobar_service, 95 void DefaultBrowserInfoBarDelegate::Create(InfoBarService* infobar_service,
96 Profile* profile) { 96 Profile* profile) {
97 infobar_service->AddInfoBar( 97 infobar_service->AddInfoBar(infobar_service->CreateConfirmInfoBar(
98 infobar_service->CreateConfirmInfoBar(scoped_ptr<ConfirmInfoBarDelegate>( 98 std::unique_ptr<ConfirmInfoBarDelegate>(
99 new DefaultBrowserInfoBarDelegate(profile)))); 99 new DefaultBrowserInfoBarDelegate(profile))));
100 } 100 }
101 101
102 DefaultBrowserInfoBarDelegate::DefaultBrowserInfoBarDelegate(Profile* profile) 102 DefaultBrowserInfoBarDelegate::DefaultBrowserInfoBarDelegate(Profile* profile)
103 : ConfirmInfoBarDelegate(), 103 : ConfirmInfoBarDelegate(),
104 profile_(profile), 104 profile_(profile),
105 action_taken_(false), 105 action_taken_(false),
106 should_expire_(false), 106 should_expire_(false),
107 weak_factory_(this) { 107 weak_factory_(this) {
108 // We want the info-bar to stick-around for few seconds and then be hidden 108 // We want the info-bar to stick-around for few seconds and then be hidden
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 profile->GetPrefs()->ClearPref(prefs::kCheckDefaultBrowser); 293 profile->GetPrefs()->ClearPref(prefs::kCheckDefaultBrowser);
294 } 294 }
295 295
296 #if !defined(OS_WIN) 296 #if !defined(OS_WIN)
297 bool ShowFirstRunDefaultBrowserPrompt(Profile* profile) { 297 bool ShowFirstRunDefaultBrowserPrompt(Profile* profile) {
298 return false; 298 return false;
299 } 299 }
300 #endif 300 #endif
301 301
302 } // namespace chrome 302 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698