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

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

Issue 1708593002: Componentize IDS_SESSION_CRASHED_* to allow sharing with iOS. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move branded strings to components_$(branding).grd Created 4 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
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/session_crashed_infobar_delegate.h" 5 #include "chrome/browser/ui/startup/session_crashed_infobar_delegate.h"
6 6
7 #include "build/build_config.h" 7 #include "build/build_config.h"
8 #include "chrome/browser/infobars/infobar_service.h" 8 #include "chrome/browser/infobars/infobar_service.h"
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/browser/search/search.h" 10 #include "chrome/browser/search/search.h"
11 #include "chrome/browser/sessions/session_restore.h" 11 #include "chrome/browser/sessions/session_restore.h"
12 #include "chrome/browser/ui/browser.h" 12 #include "chrome/browser/ui/browser.h"
13 #include "chrome/browser/ui/browser_finder.h" 13 #include "chrome/browser/ui/browser_finder.h"
14 #include "chrome/browser/ui/tabs/tab_strip_model.h" 14 #include "chrome/browser/ui/tabs/tab_strip_model.h"
15 #include "chrome/common/url_constants.h" 15 #include "chrome/common/url_constants.h"
16 #include "chrome/grit/chromium_strings.h" 16 #include "chrome/grit/chromium_strings.h"
17 #include "chrome/grit/generated_resources.h" 17 #include "chrome/grit/generated_resources.h"
18 #include "components/infobars/core/infobar.h" 18 #include "components/infobars/core/infobar.h"
19 #include "components/strings/grit/components_chromium_strings.h"
20 #include "components/strings/grit/components_google_chrome_strings.h"
21 #include "components/strings/grit/components_strings.h"
19 #include "content/public/browser/dom_storage_context.h" 22 #include "content/public/browser/dom_storage_context.h"
20 #include "content/public/browser/storage_partition.h" 23 #include "content/public/browser/storage_partition.h"
21 #include "grit/theme_resources.h" 24 #include "grit/theme_resources.h"
22 #include "ui/base/l10n/l10n_util.h" 25 #include "ui/base/l10n/l10n_util.h"
23 #include "ui/gfx/vector_icons_public.h" 26 #include "ui/gfx/vector_icons_public.h"
24 27
25 // static 28 // static
26 void SessionCrashedInfoBarDelegate::Create(Browser* browser) { 29 void SessionCrashedInfoBarDelegate::Create(Browser* browser) {
27 // Assume that if the user is launching incognito they were previously running 30 // Assume that if the user is launching incognito they were previously running
28 // incognito so that we have nothing to restore from. 31 // incognito so that we have nothing to restore from.
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 return l10n_util::GetStringUTF16(IDS_SESSION_CRASHED_VIEW_RESTORE_BUTTON); 90 return l10n_util::GetStringUTF16(IDS_SESSION_CRASHED_VIEW_RESTORE_BUTTON);
88 } 91 }
89 92
90 bool SessionCrashedInfoBarDelegate::Accept() { 93 bool SessionCrashedInfoBarDelegate::Accept() {
91 Browser* browser = chrome::FindBrowserWithWebContents( 94 Browser* browser = chrome::FindBrowserWithWebContents(
92 InfoBarService::WebContentsFromInfoBar(infobar())); 95 InfoBarService::WebContentsFromInfoBar(infobar()));
93 SessionRestore::RestoreSessionAfterCrash(browser); 96 SessionRestore::RestoreSessionAfterCrash(browser);
94 accepted_ = true; 97 accepted_ = true;
95 return true; 98 return true;
96 } 99 }
OLDNEW
« no previous file with comments | « chrome/app/google_chrome_strings.grd ('k') | chrome/browser/ui/views/session_crashed_bubble_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698