OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 // ====== New Architecture ===== | 5 // ====== New Architecture ===== |
6 // = This code is only used in the new iOS Chrome architecture. = | 6 // = This code is only used in the new iOS Chrome architecture. = |
7 // ============================================================================ | 7 // ============================================================================ |
8 | 8 |
9 #import "ios/chrome/app/steps/tab_grid_coordinator+application_step.h" | 9 #import "ios/clean/chrome/app/steps/tab_grid_coordinator+application_step.h" |
10 | 10 |
11 #import "base/supports_user_data.h" | 11 #import "base/supports_user_data.h" |
12 #import "ios/chrome/app/application_state.h" | 12 #import "ios/clean/chrome/app/application_state.h" |
13 #import "ios/chrome/browser/browser_coordinator+internal.h" | 13 #import "ios/clean/chrome/browser/browser_coordinator+internal.h" |
14 | 14 |
15 #if !defined(__has_feature) || !__has_feature(objc_arc) | 15 #if !defined(__has_feature) || !__has_feature(objc_arc) |
16 #error "This file requires ARC support." | 16 #error "This file requires ARC support." |
17 #endif | 17 #endif |
18 | 18 |
19 namespace { | 19 namespace { |
20 // SupportsUserData storage container for a BrowserCoordinator object, which | 20 // SupportsUserData storage container for a BrowserCoordinator object, which |
21 // keeps a strong reference to the object it is initialized with. | 21 // keeps a strong reference to the object it is initialized with. |
22 class RootCoordinatorContainer : public base::SupportsUserData::Data { | 22 class RootCoordinatorContainer : public base::SupportsUserData::Data { |
23 public: | 23 public: |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 | 71 |
72 - (BOOL)canRunInState:(ApplicationState*)state { | 72 - (BOOL)canRunInState:(ApplicationState*)state { |
73 return state.phase = APPLICATION_TERMINATING; | 73 return state.phase = APPLICATION_TERMINATING; |
74 } | 74 } |
75 | 75 |
76 - (void)runInState:(ApplicationState*)state { | 76 - (void)runInState:(ApplicationState*)state { |
77 state.persistentState->RemoveUserData(kRootCoordinatorContainerKey); | 77 state.persistentState->RemoveUserData(kRootCoordinatorContainerKey); |
78 } | 78 } |
79 | 79 |
80 @end | 80 @end |
OLD | NEW |