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

Side by Side Diff: chrome/browser/profiles/off_the_record_profile_impl.cc

Issue 12212048: Linux/ChromeOS Chromium style checker cleanup, chrome/browser edition. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 7 years, 10 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 (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/profiles/off_the_record_profile_impl.h" 5 #include "chrome/browser/profiles/off_the_record_profile_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/file_path.h" 10 #include "base/file_path.h"
(...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after
447 447
448 #if defined(OS_CHROMEOS) 448 #if defined(OS_CHROMEOS)
449 // Special case of the OffTheRecordProfileImpl which is used while Guest 449 // Special case of the OffTheRecordProfileImpl which is used while Guest
450 // session in CrOS. 450 // session in CrOS.
451 class GuestSessionProfile : public OffTheRecordProfileImpl { 451 class GuestSessionProfile : public OffTheRecordProfileImpl {
452 public: 452 public:
453 explicit GuestSessionProfile(Profile* real_profile) 453 explicit GuestSessionProfile(Profile* real_profile)
454 : OffTheRecordProfileImpl(real_profile) { 454 : OffTheRecordProfileImpl(real_profile) {
455 } 455 }
456 456
457 virtual void InitChromeOSPreferences() { 457 virtual void InitChromeOSPreferences() OVERRIDE {
458 chromeos_preferences_.reset(new chromeos::Preferences()); 458 chromeos_preferences_.reset(new chromeos::Preferences());
459 chromeos_preferences_->Init(GetPrefs()); 459 chromeos_preferences_->Init(GetPrefs());
460 } 460 }
461 461
462 private: 462 private:
463 // The guest user should be able to customize Chrome OS preferences. 463 // The guest user should be able to customize Chrome OS preferences.
464 scoped_ptr<chromeos::Preferences> chromeos_preferences_; 464 scoped_ptr<chromeos::Preferences> chromeos_preferences_;
465 }; 465 };
466 #endif 466 #endif
467 467
468 Profile* Profile::CreateOffTheRecordProfile() { 468 Profile* Profile::CreateOffTheRecordProfile() {
469 OffTheRecordProfileImpl* profile = NULL; 469 OffTheRecordProfileImpl* profile = NULL;
470 #if defined(OS_CHROMEOS) 470 #if defined(OS_CHROMEOS)
471 if (IsGuestSession()) 471 if (IsGuestSession())
472 profile = new GuestSessionProfile(this); 472 profile = new GuestSessionProfile(this);
473 #endif 473 #endif
474 if (!profile) 474 if (!profile)
475 profile = new OffTheRecordProfileImpl(this); 475 profile = new OffTheRecordProfileImpl(this);
476 profile->Init(); 476 profile->Init();
477 return profile; 477 return profile;
478 } 478 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698