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

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

Issue 671653002: Standardize usage of virtual/override/final in chrome/browser/ui/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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/startup_browser_creator_impl.h" 5 #include "chrome/browser/ui/startup/startup_browser_creator_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "apps/app_restore_service.h" 10 #include "apps/app_restore_service.h"
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 CoreAppLauncherHandler::RecordAppLaunchType( 239 CoreAppLauncherHandler::RecordAppLaunchType(
240 extension_misc::APP_LAUNCH_AUTOLAUNCH, 240 extension_misc::APP_LAUNCH_AUTOLAUNCH,
241 extension->GetType()); 241 extension->GetType());
242 } 242 }
243 } 243 }
244 } 244 }
245 245
246 class WebContentsCloseObserver : public content::NotificationObserver { 246 class WebContentsCloseObserver : public content::NotificationObserver {
247 public: 247 public:
248 WebContentsCloseObserver() : contents_(NULL) {} 248 WebContentsCloseObserver() : contents_(NULL) {}
249 virtual ~WebContentsCloseObserver() {} 249 ~WebContentsCloseObserver() override {}
250 250
251 void SetContents(content::WebContents* contents) { 251 void SetContents(content::WebContents* contents) {
252 DCHECK(!contents_); 252 DCHECK(!contents_);
253 contents_ = contents; 253 contents_ = contents;
254 254
255 registrar_.Add(this, 255 registrar_.Add(this,
256 content::NOTIFICATION_WEB_CONTENTS_DESTROYED, 256 content::NOTIFICATION_WEB_CONTENTS_DESTROYED,
257 content::Source<content::WebContents>(contents_)); 257 content::Source<content::WebContents>(contents_));
258 } 258 }
259 259
260 content::WebContents* contents() { return contents_; } 260 content::WebContents* contents() { return contents_; }
261 261
262 private: 262 private:
263 // content::NotificationObserver overrides: 263 // content::NotificationObserver overrides:
264 virtual void Observe(int type, 264 void Observe(int type,
265 const content::NotificationSource& source, 265 const content::NotificationSource& source,
266 const content::NotificationDetails& details) override { 266 const content::NotificationDetails& details) override {
267 DCHECK_EQ(type, content::NOTIFICATION_WEB_CONTENTS_DESTROYED); 267 DCHECK_EQ(type, content::NOTIFICATION_WEB_CONTENTS_DESTROYED);
268 contents_ = NULL; 268 contents_ = NULL;
269 } 269 }
270 270
271 content::WebContents* contents_; 271 content::WebContents* contents_;
272 content::NotificationRegistrar registrar_; 272 content::NotificationRegistrar registrar_;
273 273
274 DISALLOW_COPY_AND_ASSIGN(WebContentsCloseObserver); 274 DISALLOW_COPY_AND_ASSIGN(WebContentsCloseObserver);
275 }; 275 };
276 276
(...skipping 630 matching lines...) Expand 10 before | Expand all | Expand 10 after
907 // behavior is desired because completing or skipping the sync promo 907 // behavior is desired because completing or skipping the sync promo
908 // causes a redirect to the NTP. 908 // causes a redirect to the NTP.
909 if (!startup_urls->empty() && 909 if (!startup_urls->empty() &&
910 startup_urls->at(0) == GURL(chrome::kChromeUINewTabURL)) 910 startup_urls->at(0) == GURL(chrome::kChromeUINewTabURL))
911 startup_urls->at(0) = sync_promo_url; 911 startup_urls->at(0) = sync_promo_url;
912 else 912 else
913 startup_urls->insert(startup_urls->begin(), sync_promo_url); 913 startup_urls->insert(startup_urls->begin(), sync_promo_url);
914 } 914 }
915 } 915 }
916 } 916 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698