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

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

Issue 517713002: [Android] Add enhanced bookmark opt-in flag. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comment update 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/external_component_loader.h" 5 #include "chrome/browser/extensions/external_component_loader.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/sha1.h" 8 #include "base/sha1.h"
9 #include "base/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
10 #include "chrome/browser/bookmarks/enhanced_bookmarks_features.h" 10 #include "chrome/browser/bookmarks/enhanced_bookmarks_features.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 std::string hotwordId = extension_misc::kHotwordExtensionId; 59 std::string hotwordId = extension_misc::kHotwordExtensionId;
60 CommandLine* command_line = CommandLine::ForCurrentProcess(); 60 CommandLine* command_line = CommandLine::ForCurrentProcess();
61 // TODO(amistry): Load the hotword shared module when enabling built-in 61 // TODO(amistry): Load the hotword shared module when enabling built-in
62 // hotword detection. 62 // hotword detection.
63 if (!command_line->HasSwitch(switches::kEnableExperimentalHotwording)) { 63 if (!command_line->HasSwitch(switches::kEnableExperimentalHotwording)) {
64 prefs_->SetString(hotwordId + ".external_update_url", 64 prefs_->SetString(hotwordId + ".external_update_url",
65 extension_urls::GetWebstoreUpdateUrl().spec()); 65 extension_urls::GetWebstoreUpdateUrl().spec());
66 } 66 }
67 } 67 }
68 68
69 UpdateBookmarksExperimentState( 69 InitBookmarksExperimentState(profile_);
70 profile_->GetPrefs(), 70
71 g_browser_process->local_state(),
72 IsUserSignedin(profile_),
73 BOOKMARKS_EXPERIMENT_ENABLED_FROM_SYNC_UNKNOWN);
74 std::string ext_id; 71 std::string ext_id;
75 if (GetBookmarksExperimentExtensionID(profile_->GetPrefs(), &ext_id) && 72 if (GetBookmarksExperimentExtensionID(profile_->GetPrefs(), &ext_id) &&
76 !ext_id.empty()) { 73 !ext_id.empty()) {
77 prefs_->SetString(ext_id + ".external_update_url", 74 prefs_->SetString(ext_id + ".external_update_url",
78 extension_urls::GetWebstoreUpdateUrl().spec()); 75 extension_urls::GetWebstoreUpdateUrl().spec());
79 } 76 }
80 77
81 LoadFinished(); 78 LoadFinished();
82 } 79 }
83 80
84 } // namespace extensions 81 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698