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

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

Issue 511393003: No longer register app window placement preference keys on the fly. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: update to ToT Created 6 years, 3 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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/browser.h" 5 #include "chrome/browser/ui/browser.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <windows.h> 8 #include <windows.h>
9 #include <shellapi.h> 9 #include <shellapi.h>
10 #endif // defined(OS_WIN) 10 #endif // defined(OS_WIN)
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 CHECK(IncognitoModePrefs::CanOpenBrowser(profile_)); 360 CHECK(IncognitoModePrefs::CanOpenBrowser(profile_));
361 CHECK(!profile_->IsGuestSession() || profile_->IsOffTheRecord()) 361 CHECK(!profile_->IsGuestSession() || profile_->IsOffTheRecord())
362 << "Only off the record browser may be opened in guest mode"; 362 << "Only off the record browser may be opened in guest mode";
363 363
364 // TODO(jeremy): Move to initializer list once flag is removed. 364 // TODO(jeremy): Move to initializer list once flag is removed.
365 if (IsFastTabUnloadEnabled()) 365 if (IsFastTabUnloadEnabled())
366 fast_unload_controller_.reset(new chrome::FastUnloadController(this)); 366 fast_unload_controller_.reset(new chrome::FastUnloadController(this));
367 else 367 else
368 unload_controller_.reset(new chrome::UnloadController(this)); 368 unload_controller_.reset(new chrome::UnloadController(this));
369 369
370 if (!app_name_.empty())
371 chrome::RegisterAppPrefs(app_name_, profile_);
372 tab_strip_model_->AddObserver(this); 370 tab_strip_model_->AddObserver(this);
373 371
374 toolbar_model_.reset(new ToolbarModelImpl(toolbar_model_delegate_.get())); 372 toolbar_model_.reset(new ToolbarModelImpl(toolbar_model_delegate_.get()));
375 search_model_.reset(new SearchModel()); 373 search_model_.reset(new SearchModel());
376 search_delegate_.reset(new SearchDelegate(search_model_.get())); 374 search_delegate_.reset(new SearchDelegate(search_model_.get()));
377 375
378 registrar_.Add(this, 376 registrar_.Add(this,
379 extensions::NOTIFICATION_EXTENSION_LOADED_DEPRECATED, 377 extensions::NOTIFICATION_EXTENSION_LOADED_DEPRECATED,
380 content::Source<Profile>(profile_->GetOriginalProfile())); 378 content::Source<Profile>(profile_->GetOriginalProfile()));
381 registrar_.Add(this, 379 registrar_.Add(this,
(...skipping 2091 matching lines...) Expand 10 before | Expand all | Expand 10 after
2473 if (contents && !allow_js_access) { 2471 if (contents && !allow_js_access) {
2474 contents->web_contents()->GetController().LoadURL( 2472 contents->web_contents()->GetController().LoadURL(
2475 target_url, 2473 target_url,
2476 content::Referrer(), 2474 content::Referrer(),
2477 content::PAGE_TRANSITION_LINK, 2475 content::PAGE_TRANSITION_LINK,
2478 std::string()); // No extra headers. 2476 std::string()); // No extra headers.
2479 } 2477 }
2480 2478
2481 return contents != NULL; 2479 return contents != NULL;
2482 } 2480 }
OLDNEW
« no previous file with comments | « chrome/browser/prefs/chrome_pref_service_factory.cc ('k') | chrome/browser/ui/browser_ui_prefs.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698