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

Side by Side Diff: chrome/browser/extensions/api/messaging/incognito_connectability.cc

Issue 1871713002: Convert //chrome/browser/extensions from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and fix header 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 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/extensions/api/messaging/incognito_connectability.h" 5 #include "chrome/browser/extensions/api/messaging/incognito_connectability.h"
6 6
7 #include "base/lazy_instance.h" 7 #include "base/lazy_instance.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/strings/string16.h" 9 #include "base/strings/string16.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 bool answered_; 60 bool answered_;
61 InfoBarCallback callback_; 61 InfoBarCallback callback_;
62 }; 62 };
63 63
64 // static 64 // static
65 InfoBar* IncognitoConnectabilityInfoBarDelegate::Create( 65 InfoBar* IncognitoConnectabilityInfoBarDelegate::Create(
66 InfoBarManager* infobar_manager, 66 InfoBarManager* infobar_manager,
67 const base::string16& message, 67 const base::string16& message,
68 const IncognitoConnectabilityInfoBarDelegate::InfoBarCallback& callback) { 68 const IncognitoConnectabilityInfoBarDelegate::InfoBarCallback& callback) {
69 return infobar_manager->AddInfoBar(infobar_manager->CreateConfirmInfoBar( 69 return infobar_manager->AddInfoBar(infobar_manager->CreateConfirmInfoBar(
70 scoped_ptr<ConfirmInfoBarDelegate>( 70 std::unique_ptr<ConfirmInfoBarDelegate>(
71 new IncognitoConnectabilityInfoBarDelegate(message, callback)))); 71 new IncognitoConnectabilityInfoBarDelegate(message, callback))));
72 } 72 }
73 73
74 IncognitoConnectabilityInfoBarDelegate::IncognitoConnectabilityInfoBarDelegate( 74 IncognitoConnectabilityInfoBarDelegate::IncognitoConnectabilityInfoBarDelegate(
75 const base::string16& message, 75 const base::string16& message,
76 const InfoBarCallback& callback) 76 const InfoBarCallback& callback)
77 : message_(message), answered_(false), callback_(callback) { 77 : message_(message), answered_(false), callback_(callback) {
78 } 78 }
79 79
80 IncognitoConnectabilityInfoBarDelegate:: 80 IncognitoConnectabilityInfoBarDelegate::
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 BrowserContextKeyedAPIFactory<IncognitoConnectability> > g_factory = 293 BrowserContextKeyedAPIFactory<IncognitoConnectability> > g_factory =
294 LAZY_INSTANCE_INITIALIZER; 294 LAZY_INSTANCE_INITIALIZER;
295 295
296 // static 296 // static
297 BrowserContextKeyedAPIFactory<IncognitoConnectability>* 297 BrowserContextKeyedAPIFactory<IncognitoConnectability>*
298 IncognitoConnectability::GetFactoryInstance() { 298 IncognitoConnectability::GetFactoryInstance() {
299 return g_factory.Pointer(); 299 return g_factory.Pointer();
300 } 300 }
301 301
302 } // namespace extensions 302 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698