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

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

Issue 560024: Reland 37913. Clear local state on exit. (Closed)
Patch Set: Created 10 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
« no previous file with comments | « no previous file | chrome/browser/browser_process_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/browser.h" 5 #include "chrome/browser/browser.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 9
10 #include "app/animation.h" 10 #include "app/animation.h"
(...skipping 1352 matching lines...) Expand 10 before | Expand all | Expand 10 after
1363 prefs->RegisterDictionaryPref(prefs::kBrowserWindowPlacement); 1363 prefs->RegisterDictionaryPref(prefs::kBrowserWindowPlacement);
1364 prefs->RegisterIntegerPref(prefs::kOptionsWindowLastTabIndex, 0); 1364 prefs->RegisterIntegerPref(prefs::kOptionsWindowLastTabIndex, 0);
1365 prefs->RegisterIntegerPref(prefs::kDevToolsSplitLocation, -1); 1365 prefs->RegisterIntegerPref(prefs::kDevToolsSplitLocation, -1);
1366 } 1366 }
1367 1367
1368 // static 1368 // static
1369 void Browser::RegisterUserPrefs(PrefService* prefs) { 1369 void Browser::RegisterUserPrefs(PrefService* prefs) {
1370 prefs->RegisterStringPref(prefs::kHomePage, 1370 prefs->RegisterStringPref(prefs::kHomePage,
1371 ASCIIToWide(chrome::kChromeUINewTabURL)); 1371 ASCIIToWide(chrome::kChromeUINewTabURL));
1372 prefs->RegisterBooleanPref(prefs::kHomePageIsNewTabPage, true); 1372 prefs->RegisterBooleanPref(prefs::kHomePageIsNewTabPage, true);
1373 prefs->RegisterBooleanPref(prefs::kClearSiteDataOnExit, false);
1373 prefs->RegisterBooleanPref(prefs::kShowHomeButton, false); 1374 prefs->RegisterBooleanPref(prefs::kShowHomeButton, false);
1374 #if defined(OS_MACOSX) 1375 #if defined(OS_MACOSX)
1375 // This really belongs in platform code, but there's no good place to 1376 // This really belongs in platform code, but there's no good place to
1376 // initialize it between the time when the AppController is created 1377 // initialize it between the time when the AppController is created
1377 // (where there's no profile) and the time the controller gets another 1378 // (where there's no profile) and the time the controller gets another
1378 // crack at the start of the main event loop. By that time, BrowserInit 1379 // crack at the start of the main event loop. By that time, BrowserInit
1379 // has already created the browser window, and it's too late: we need the 1380 // has already created the browser window, and it's too late: we need the
1380 // pref to be already initialized. Doing it here also saves us from having 1381 // pref to be already initialized. Doing it here also saves us from having
1381 // to hard-code pref registration in the several unit tests that use 1382 // to hard-code pref registration in the several unit tests that use
1382 // this preference. 1383 // this preference.
(...skipping 1851 matching lines...) Expand 10 before | Expand all | Expand 10 after
3234 if (TabHasUnloadListener(contents)) { 3235 if (TabHasUnloadListener(contents)) {
3235 // If the page has unload listeners, then we tell the renderer to fire 3236 // If the page has unload listeners, then we tell the renderer to fire
3236 // them. Once they have fired, we'll get a message back saying whether 3237 // them. Once they have fired, we'll get a message back saying whether
3237 // to proceed closing the page or not, which sends us back to this method 3238 // to proceed closing the page or not, which sends us back to this method
3238 // with the HasUnloadListener bit cleared. 3239 // with the HasUnloadListener bit cleared.
3239 contents->render_view_host()->FirePageBeforeUnload(false); 3240 contents->render_view_host()->FirePageBeforeUnload(false);
3240 return true; 3241 return true;
3241 } 3242 }
3242 return false; 3243 return false;
3243 } 3244 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/browser_process_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698