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

Side by Side Diff: chrome/browser/extensions/api/input_ime/input_ime_api.cc

Issue 1896993003: Not use ProfileCompare when removing profile. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove ProfileCompare. Created 4 years, 8 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/extensions/api/input_ime/input_ime_api.h" 5 #include "chrome/browser/extensions/api/input_ime/input_ime_api.h"
6 6
7 #include "base/lazy_instance.h" 7 #include "base/lazy_instance.h"
8 #include "chrome/browser/chrome_notification_types.h" 8 #include "chrome/browser/chrome_notification_types.h"
9 #include "chrome/common/extensions/api/input_ime.h" 9 #include "chrome/common/extensions/api/input_ime.h"
10 #include "content/public/browser/notification_registrar.h" 10 #include "content/public/browser/notification_registrar.h"
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after
405 static base::LazyInstance<BrowserContextKeyedAPIFactory<InputImeAPI> > 405 static base::LazyInstance<BrowserContextKeyedAPIFactory<InputImeAPI> >
406 g_factory = LAZY_INSTANCE_INITIALIZER; 406 g_factory = LAZY_INSTANCE_INITIALIZER;
407 407
408 // static 408 // static
409 BrowserContextKeyedAPIFactory<InputImeAPI>* InputImeAPI::GetFactoryInstance() { 409 BrowserContextKeyedAPIFactory<InputImeAPI>* InputImeAPI::GetFactoryInstance() {
410 return g_factory.Pointer(); 410 return g_factory.Pointer();
411 } 411 }
412 412
413 InputImeEventRouter* GetInputImeEventRouter(Profile* profile) { 413 InputImeEventRouter* GetInputImeEventRouter(Profile* profile) {
414 if (!profile) 414 if (!profile)
415 return nullptr; 415 return nullptr;
Shu Chen 2016/04/19 07:27:17 the null check here seems unnecessary.
Azure Wei 2016/04/19 08:15:15 Removed.
416 if (profile->HasOffTheRecordProfile())
417 profile = profile->GetOffTheRecordProfile();
418 return extensions::InputImeEventRouterFactory::GetInstance()->GetRouter( 416 return extensions::InputImeEventRouterFactory::GetInstance()->GetRouter(
419 profile); 417 profile);
420 } 418 }
421 419
422 } // namespace extensions 420 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698